Function

vDSP_vneg

Calculates the negative value of each element in the supplied single-precision vector using specified stride.

Declaration

void vDSP_vneg(const float *__A, vDSP_Stride __IA, float *__C, vDSP_Stride __IC, vDSP_Length __N);

Parameters

__A

Single-precision real input vector.

__IA

Address stride for A.

__C

Single-precision real output vector.

__IC

Address stride for C.

__N

The number of elements to process.

Discussion

This calculates the following:

    for (n = 0; n < N; ++n)
        C[n*IC] = -A[n*IA];

Each value in C is replaced by the negated value of the corresponding element in A.

See Also

Single-Vector Negation

vDSP_vnegD

Calculates the negative value of each element in the supplied double-precision vector using specified stride.

vDSP_zvneg

Complex vector negate; single precision.

vDSP_zvnegD

Complex vector negate; double precision.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software