TinyLlama.cpp 1.0
A lightweight C++ implementation of the TinyLlama language model
Loading...
Searching...
No Matches
Functions
detail Namespace Reference

Functions

template<typename T >
safe_min (T a, T b)
 
template<typename T >
safe_max (T a, T b)
 
float safe_sqrt (float x)
 

Function Documentation

◆ safe_max()

template<typename T >
T detail::safe_max ( a,
b 
)
inline

Definition at line 27 of file model_macros.h.

27 {
28 return (std::max)(a, b); // Parentheses prevent macro expansion
29}

◆ safe_min()

template<typename T >
T detail::safe_min ( a,
b 
)
inline

Definition at line 22 of file model_macros.h.

22 {
23 return (std::min)(a, b); // Parentheses prevent macro expansion
24}

◆ safe_sqrt()

float detail::safe_sqrt ( float  x)
inline

Definition at line 31 of file model_macros.h.

31 {
32 return (std::sqrt)(x); // Parentheses prevent macro expansion
33}