AI Engine Intrinsics User Guide  (AIE) v(2024.1)
 All Data Structures Namespaces Functions Variables Typedefs Groups Pages
Datatype Conversions

Support for converting floating-point vectors to fixed-point vectors and fixed-point vectors to floating-point vectors. More...

Overview

Support for converting floating-point vectors to fixed-point vectors and fixed-point vectors to floating-point vectors.

These intrinsics can generate exceptions, for more information you can go here.

Note
These intrinsics do real conversions. No bit reinterpretation takes place.

Functions

v8float fix2float (v8int32 ivec, int sft)
 Fixed-point to Floating-point conversion with scaling.
 
v8float fix2float (v8int32 ivec)
 Fixed-point to Floating-point conversion without scaling.
 
v8int32 float2fix (v8float v, int sft)
 Floating-point to Fixed-point conversion with scaling.
 
v8int32 float2fix (v8float v)
 Floating-point to Fixed-point conversion without scaling.
 

Function Documentation

v8float fix2float ( v8int32  ivec,
int  sft 
)

Fixed-point to Floating-point conversion with scaling.

Parameters
nInteger input value
sftBinary point of input value. Range [-32:31].

This is a vectorized version of fix2float(int n, int sft)

v8float fix2float ( v8int32  ivec)

Fixed-point to Floating-point conversion without scaling.

Parameters
nInteger input value

This is a vectorized version of fix2float(int n)

v8int32 float2fix ( v8float  v,
int  sft 
)

Floating-point to Fixed-point conversion with scaling.

Parameters
nFloating point input value
sftBinary point of output value. Range [-32:31].

This is a vectorized version of float2fix(float n, int sft)

Note
If FLOAT2FIX_FAST is not defined, this is an alias to float2fix_safe(v8float v, int sft). Otherwise it is an alias to float2fix_fast(v8float v, int sft)
v8int32 float2fix ( v8float  v)

Floating-point to Fixed-point conversion without scaling.

Parameters
nFloating point input value

This is a vectorized version of float2fix(float n)