Function

vDSP_vfixru16

Converts an array of single-precision floating-point values to unsigned 16-bit integer values, rounding towards nearest integer.

Declaration

void vDSP_vfixru16(const float *__A, vDSP_Stride __IA, unsigned short *__C, vDSP_Stride __IC, vDSP_Length __N);

Parameters

__A

Source vector.

__IA

Source vector stride length.

__C

Destination vector.

__IC

Destination vector stride length.

__N

Number of elements in vector.

Discussion

If the resulting value is outside the bounds of the output type, the behavior is undefined. If you need to handle out-of-bounds data, you should use one of the functions in Clipping Operations on the data first.

See Also

Single-Vector Floating Point to 16-Bit Integer Conversion

vDSP_vfix16

Converts an array of single-precision floating-point values to signed 16-bit integer values, rounding towards zero.

vDSP_vfix16D

Converts an array of double-precision floating-point values to signed 16-bit integer values, rounding towards zero.

vDSP_vfixr16

Converts an array of single-precision floating-point values to signed 16-bit integer values, rounding towards nearest integer.

vDSP_vfixr16D

Converts an array of double-precision floating-point values to signed 16-bit integer values, rounding towards nearest integer.

vDSP_vfixu16

Converts an array of single-precision floating-point values to unsigned 16-bit integer values, rounding towards zero.

vDSP_vfixu16D

Converts an array of double-precision floating-point values to unsigned 16-bit integer values, rounding towards zero.

vDSP_vfixru16D

Converts an array of double-precision floating-point values to unsigned 16-bit integer values, rounding towards nearest integer.