User Manual

Table Of Contents
float _sqrtf(float) // Square root
int _ceil(float // Round to integer toward + infinity
int _floor(float) // Round to integer toward - infinity
float _fmod(float x, float y) // Modulus. Returns x – y * trunc(x /
y)
float _fremainder(float x, float y) // Floating point remainder
int _round(float x) // Integral value nearest to x rounding
float _hypotf(float x, float y) // Square root of (x^2 + y^2)
float _atan2f(float x) // Arc tangent of (y / x)
float _sinf(float x) // Sine
float _cosf(float x) // Cosine
float _acosf(float x) // Arc cosine
float _asinf(float x) // Arc sine
float _fdivide(float x, float y) // Return (x / y)
float _frecip(float x) // Return (1 / x)
The following functions support integer type:
min, max, abs, rotate
Other supported C Math functions include:
acosh, acospi, asinh, asinpi, atan, atanh, atanpi, atan2pi, cbrt, cosh, cospi,
exp10, expm1, trunc, fdim, fma, lgamma, log1p, logb, rint, round, rsqrt,
sincos, sinh, sinpi, tan, tanh, tanpi, tgamma
Vector types float2, float3, and float4 are supported. The data fields are:
float x
float y
float z
float w
To generate a vector value, use make_floatN() where N = 2, 3, or 4.
Users can define their own structure using “typedef struct.” For example:
typedef struct
{
float c00, c01, c02;
float c10, c11, c12;
} Matrix;
To declare constant memory, use __CONSTANT__. For example:
__CONSTANT__ float NORM[] = {1.0f / 3.0f, 1.0f / 3.0f, 1.0f / 3.0f};
To pass the constant memory as a function argument, use the __CONSTANTREF__
qualifier, e.g.:
__DEVICE__ float DoSomething(__CONSTANTREF__ float* p_Params)
A float value must have the ‘f’ character at the end (e.g. 1.2f).
Chapter – 174 Creating DCTL LUTs 3536