Scales and converts single-precision floating-point values to unsigned 24-bit integer values.


void vDSP_vsmfixu24(const float vDSP_input1[], ptrdiff_t vDSP_stride1, const float vDSP_input2[], vDSP_uint24 *vDSP_input3, ptrdiff_t vDSP_stride2, size_t vDSP_size);



Single-precision floating-point input vector.


Stride for A.


Pointer to a floating-point scaling factor.


Unsigned 24-bit integer output vector.


Stride for C.


The number of values to convert.


This function scales vector A by the scalar *B and converts each resulting value to an unsigned 24-bit integer, placing the results in C. Values (after scaling) that are outside the range that can be represented by unsigned 24-bit integers are clamped to the largest or smallest representable values.

This function performs the following operations:

    for (n = 0; n < N; ++n)
        if     (A[n*IA] * *B < 0)
            C[n*IC] = 0
        else if (A[n*IA] * *B > UINT24_MAX)
            C[n*IC] = UINT24_MAX
            C[n*IC] = (uint24)(A[n*IA] * *B);

In this pseudocode, UINT24_MAX is equal to 2^24 - 1.