Mac Developer Library

Developer

Accelerate Framework Reference vecLib Reference

Options
Deployment Target:

On This Page
Language:

vecLib Reference

The vecLib framework contains nine C header files (not counting vecLib.h which merely includes the others). Two of them, vDSP.h and vDSP_translate.h, are covered in vDSP Programming Guide and vDSP Reference.

Three of the header files are Apple’s versions of well-known libraries which are described in detail in external references:

This document describes the functions declared in the remaining header files: vecLibTypes.h, vfp.h, vForce.h, vBasicOps.h, vectorOps.h, and vBigNum.h. These files support the vector mathematical functions library (also called “vMathLib”), which runs on vector processing hardware if available.

This library abstracts the vector processing capability so that code written for it will execute appropriate instructions for the processor available at runtime. For this reason, unless you are writing specialized code that targets a single CPU, you should generally use these functions rather than directly using vector instructions. By using these functions, your code does not have to deal with subtle differences in vector instruction availability between different microarchitectures, freeing you to focus on the problem you are trying to solve. Also, code written using vecLib tends to be easier to port to different CPU architectures (porting your core libraries to ARM on iOS, for example).

vecLibTypes.h

The vecLibTypes.h header file defines a set of vector data types (vFloat, vUInt32, etc.), which represent 128-bit vectors containing values of type float, UInt32, etc. The vBasicOps.h and vfp.h headers make use of these types.

The type names all begin with the letter “v,” followed by a mnemonic for the scalar data type used for elements of the vector. For example, vUInt32, vSInt16, vFloat, etc.

vBasicOps.h

vBasicOps.h declares a set of basic arithmetic and logical functions on 128-bit vectors, using the integer types from vecLibTypes.h.

The function names begin with “v,” followed by a mnemonic for the type of operation, e.g. “S” or “U” for signed or unsigned, then the width of the operation, then the name of the operation. For example, vS8Divide performs division of signed 8-bit values packed into 128-bit vectors.

vfp.h

vfp.h declares a set of floating-point arithmetic, transcendental and trigonometric functions, on 128-bit vectors, using the floating-point types from vecLibTypes.h.

These functions are named with their customary mathematical names, prefixed with the letter “v”, and all except vtablelookup() have the suffix “f” to indicate that they work with single-precision floating-point data. For example, vcosf is the single-precision cosine function.

vForce.h

vForce.h declares a set of trigonometric and transcendental functions in terms of C arrays (double * or float *), which can be of any desired length. Internally, the C arrays are converted piecewise into collections of 128-bit vectors, if appropriate for the current architecture.

The functions declared in vForce.h are named with the customary mathematical names, but with the prefix “vv.” Each mathematical function is available in two variants: one for single-precision floating-point data and one for double-precision data. The single-precision forms have the suffix “f”, while the double-precision forms have no suffix. For example, vvcosf is the single-precision cosine function, while vvcos is the double-precision variant.

All of the vForce.h functions follow a common format:

  • The return type is void.

  • The first parameter points to an array to hold the results. (The only exceptions are vvsincosf() and vvsincos(), which have two result arrays pointed to by the first two parameters.)

  • One or more parameters point to operand arrays, the same length as the result array.

  • The last parameter is the array length.

vectorOps.h

vectorOps.h declares a set of vector and matrix BLAS functions on arrays of 128-bit vectors containing single-precision floating-point values. The arrays can be of any desired length, but the number of float elements must be a multiple of 4.

vBigNum.h

vBigNum.h provides arithmetic and logical operations on large integers, which may be 128, 256, 512, or 1024 bits in length. It defines types for these values, and internally processes them as collections of 128-bit vectors.

vBigNum.h defines its own set of data types to represent large integer quantities, such as vS128 for a signed, 128-bit integer or vU1024 for an unsigned, 1024-bit integer. The function names begin with the data type name, followed by the name of the operation. For example, vS512Add performs addition of two 128-bit signed integers.

The functions perform logical and arithmetic operations on scalar values that may be 128, 256, 512, or 1024 bits in width. These values are implemented as structures of one, two, four, or eight 128-bit vectors, and the operations execute on the available vector-processing hardware if possible.

The functions have names that are compatible with those in vBasicOps.h.

Threading Model

In versions of vecLib prior to OS X v10.7, many vecLib routines used multiple POSIX threads to improve performance. In some cases, this could cause performance problems in applications that use large numbers of POSIX threads.

An application can limit the number of threads used by vecLib by setting the environment variable VECLIB_MAXIMUM_THREADS as follows:

  • #include <stdlib.h>
  • setenv("VECLIB_MAXIMUM_THREADS", "1", true);

To remove the limit, you can unset the environment variable as follows:

  • unsetenv("VECLIB_MAXIMUM_THREADS");

In OS X v10.7, these routines use Grand Central Dispatch, so the use of this environment variable should no longer be necessary.

For More Information

For information about membership in Apple’s developer program, go to this URL:

http://developer.apple.com/membership/

For information about the Velocity Engine, go to this URL:

http://developer.apple.com/hardwaredrivers/ve/index.html

For general technical support from Apple, go to this URL:

https://developer.apple.com/support/

Functions

  • 128-bit logical left shift.

    Declaration

    Objective-C

    vUInt32 vLL128Shift ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the entire 128-bit vector as a single value to shift.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • 128-bit logical right shift.

    Declaration

    Objective-C

    vUInt32 vLR128Shift ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the entire 128-bit vector as a single value to shift.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • 64-bit logical left shift.

    Declaration

    Objective-C

    vUInt32 vLL64Shift ( vUInt32 __vbasicops_vA, vUInt8 __vbasicops_vShiftFactor );

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit logical left shift with two shift factors.

    Declaration

    Objective-C

    vUInt32 vLL64Shift2 ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit logical right shift.

    Declaration

    Objective-C

    vUInt32 vLR64Shift ( vUInt32 __vbasicops_vA, vUInt8 __vbasicops_vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit logical right shift with two shift factors.

    Declaration

    Objective-C

    vUInt32 vLR64Shift2 ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit arithmetic (signed) shift.

    Declaration

    Objective-C

    vUInt32 vA64Shift ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit arithmetic (signed) shift with two shift factors.

    Declaration

    Objective-C

    vUInt32 vA64Shift2 ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 128-bit arithmetic (signed) shift.

    Declaration

    Objective-C

    vUInt32 vA128Shift ( vUInt32 vA, vUInt8 vShiftFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the entire 128-bit vector as a single value to shift.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit left rotate.

    Declaration

    Objective-C

    vUInt32 vL64Rotate ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit right rotate.

    Declaration

    Objective-C

    vUInt32 vR64Rotate ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit left rotate with two rotation factors.

    Declaration

    Objective-C

    vUInt32 vL64Rotate2 ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 64-bit right rotate with two rotation factors.

    Declaration

    Objective-C

    vUInt32 vR64Rotate2 ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the vector as a pair of 64-bit values to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 128-bit left rotate.

    Declaration

    Objective-C

    vUInt32 vL128Rotate ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the entire 128-bit vector as a single value to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • 128-bit right rotate.

    Declaration

    Objective-C

    vUInt32 vR128Rotate ( vUInt32 vA, vUInt8 vRotateFactor );

    Parameters

    vA

    The vector to shift.

    vShiftFactor

    The number of bits to shift the vector.

    Return Value

    Returns the shifted vector.

    Discussion

    This function treats the entire 128-bit vector as a single value to rotate.

    Import Statement

    Availability

    OS X version 10.0 and later.

  • Computes the ceiling of values in a vector of floating-point values.

    Declaration

    Objective-C

    vFloat vceilf ( vFloat );

    Parameters

    A

    The input vector.

    Return Value

    Returns a vector of floating-point values, each of which is the ceiling of the corresponding value in A.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • For each vector element, produces a value with the magnitude of arg2 and sign arg1. Note that the order of the arguments matches the recommendation of the IEEE 754 floating-point standard, which is opposite from the SANE copysign function.

    Declaration

    Objective-C

    vFloat vcopysignf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates A/B.

    Declaration

    Objective-C

    vFloat vdivf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the absolute value of v.

    Declaration

    Objective-C

    vFloat vfabf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • Computes the floor of values in a vector of floating-point values.

    Declaration

    Objective-C

    vFloat vfloorf ( vFloat );

    Parameters

    A

    The input vector.

    Return Value

    Returns a vector of floating-point values, each of which is the floor of the corresponding value in A.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Truncates the decimal portion of a vector of floating-point values.

    Declaration

    Objective-C

    vFloat vintf ( vFloat );

    Parameters

    A

    The input vector.

    Return Value

    Returns a vector of floating-point values, each of which is the result of truncating the fractional portion of the corresponding value in A.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Rounds to the nearest integer (nearest even for ties).

    Declaration

    Objective-C

    vFloat vnintf ( vFloat );

    Parameters

    A

    The input vector.

    Return Value

    Returns a vector of floating-point values, each of which is the result of rounding the corresponding value in A to the nearest integer, with ties rounded to the nearest even integer.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • For each vector element, calculates the next representable value after x in the direction of y. If x is equal to y, then y is returned.

    Declaration

    Objective-C

    vFloat vnextafterf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • Computes the reciprocal of values in a vector.

    Declaration

    Objective-C

    vFloat vrecf ( vFloat );

    Parameters

    A

    The source vector

    Return Value

    Returns a vector containing the reciprocals of the values in the source vector.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • For each vector element, calculates the inverse of the square root of X.

    Declaration

    Objective-C

    vFloat vrsqrtf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the square root of X.

    Declaration

    Objective-C

    vFloat vsqrtf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element of Index_Vect, returns the corresponding value from Table.

    Declaration

    Objective-C

    vUInt32 vtablelookup ( vSInt32 , uint32_t * );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the exponential of X.

    Declaration

    Objective-C

    vFloat vexpf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates ExpM1(x) = Exp(x) - 1. But, for small enough arguments, ExpM1(x) is expected to be more accurate than Exp(x) - 1.

    Declaration

    Objective-C

    vFloat vexpm1f ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the natural logarithm of X.

    Declaration

    Objective-C

    vFloat vlogf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates Log1P = Log(1 + x). But, for small enough arguments, Log1P is expected to be more accurate than Log(1 + x).

    Declaration

    Objective-C

    vFloat vlog1pf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • Computes the base-10 logarithm of values in a vector.

    Declaration

    Objective-C

    vFloat vlog10f ( vFloat );

    Parameters

    X

    The source vector.

    Return Value

    Returns a vector of floating point values, each of which is the base-10 logarithm of the corresponding value in the source vector.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • For each vector element, extracts the exponent of X, as a signed integral value. A subnormal argument is treated as though it were first normalized. Thus: 1 <= x * 2^(-logb(x)) < 2.

    Declaration

    Objective-C

    vFloat vlogbf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates x * 2^n efficiently. This is not normally done by computing 2^n explicitly.

    Declaration

    Objective-C

    vFloat vscalbf ( vFloat , vSInt32 );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the sine.

    Declaration

    Objective-C

    vFloat vsinf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the cosine.

    Declaration

    Objective-C

    vFloat vcosf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • Simultaneously computes sine and cosine of values in a vector.

    Declaration

    Objective-C

    vFloat vsincosf ( vFloat , vFloat * );

    Parameters

    arg

    The source vector.

    sine_result

    An output vector. On return, this contains the result of sin(x) for each value (x) in the source vector.

    Return Value

    Returns a vector that contains the result of cos(x) for each value (x) in the source vector.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • For each vector element, calculates the tangent.

    Declaration

    Objective-C

    vFloat vtanf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the arcsine. Results are in the interval [-pi/2, pi/2].

    Declaration

    Objective-C

    vFloat vasinf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the arccosine. Results are in the interval [0, pi].

    Declaration

    Objective-C

    vFloat vacosf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the arctangent. Results are in the interval [-pi/2, pi/2].

    Declaration

    Objective-C

    vFloat vatanf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the arctangent of arg2/arg1 in the interval [-pi,pi] using the sign of both arguments to determine the quadrant of the computed value.

    Declaration

    Objective-C

    vFloat vatan2f ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the hyperbolic sine of X.

    Declaration

    Objective-C

    vFloat vsinhf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the hyperbolic cosine of X.

    Declaration

    Objective-C

    vFloat vcoshf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the hyperbolic tangent of X.

    Declaration

    Objective-C

    vFloat vtanhf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the inverse hyperbolic sine of X.

    Declaration

    Objective-C

    vFloat vasinhf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the inverse hyperbolic cosine of X.

    Declaration

    Objective-C

    vFloat vacoshf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the inverse hyperbolic tangent of X.

    Declaration

    Objective-C

    vFloat vatanhf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates X to the integer power of Y.

    Declaration

    Objective-C

    vFloat vipowf ( vFloat , vSInt32 );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates X to the floating-point power of Y. The result is more accurate than using exp(log(X)*Y).

    Declaration

    Objective-C

    vFloat vpowf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates X modulo Y.

    Declaration

    Objective-C

    vFloat vfmodf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the remainder of X/Y, according to the IEEE 754 floating-point standard.

    Declaration

    Objective-C

    vFloat vremainderf ( vFloat , vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, calculates the remainder of X/Y, according to the SANE standard. It stores into QUO the 7 low-order bits of the integer quotient, such that -127 <= QUO <= 127.

    Declaration

    Objective-C

    vFloat vremquof ( vFloat , vFloat, vUInt32 * );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, returns the class of the argument (one of the FP_ ... constants defined in math.h).

    Declaration

    Objective-C

    vUInt32 vclassifyf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each vector element, returns a non-zero value if and only if the sign of arg is negative. This includes NaNs, infinities and zeros.

    Declaration

    Objective-C

    vUInt32 vsignbitf ( vFloat );

    Import Statement

    Availability

    OS X version 10.0 and later.

  • For each double-precision array element, sets y to the ceiling of x.

    Declaration

    Swift

    func vvceil(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvceil ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the ceiling of x.

    Declaration

    Swift

    func vvceilf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvceilf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Copies an array, setting the sign of each value based on a second array.

    Declaration

    Swift

    func vvcopysign(_ z: UnsafeMutablePointer<Double>, _ y: UnsafePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvcopysign ( double *, const double *, const double *, const int * );

    Parameters

    z

    The output array.

    y

    The magnitude input array.

    x

    The sign input array.

    n

    The address of an integer containing the number of elements to copy.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Copies an array, setting the sign of each value based on a second array.

    Declaration

    Swift

    func vvcopysignf(_ result: UnsafeMutablePointer<Float>, _ signs: UnsafePointer<Float>, _ float: UnsafePointer<Float>, _ int: UnsafePointer<Int32>)

    Objective-C

    void vvcopysignf ( float *, const float *, const float *, const int * );

    Parameters

    result

    Storage for the result. Modified on return.

    signs

    Array containing values with the desired signs.

    float

    Array containing values with the desired values.

    int

    The length of the arrays.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each double-precision array element, sets z to y/x.

    Declaration

    Swift

    func vvdiv(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvdiv ( double *, const double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets z to y/x.

    Declaration

    Swift

    func vvdivf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvdivf ( float *, const float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to abs(x[i]-1) for i in 0..n-1.

    Declaration

    Swift

    func vvfabs(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvfabs ( double *, const double *, const int * );

    Parameters

    y

    An input array of double-precision floating point numbers

    x

    An output array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element y[i] to abs(x[i]-1) for i in 0..n-1.

    Declaration

    Swift

    func vvfabsf(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvfabsf ( float *, const float *, const int * );

    Parameters

    y

    An input array of single-precision floating point values.

    x

    An output array of single-precision floating point values.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • For each double-precision array element, sets y to the floor of x.

    Declaration

    Swift

    func vvfloor(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvfloor ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the floor of x.

    Declaration

    Swift

    func vvfloorf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvfloorf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to the floating point remainder of (y[i]/x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvfmod(_ z: UnsafeMutablePointer<Double>, _ y: UnsafePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvfmod ( double *, const double *, const double *, const int * );

    Parameters

    z

    An output array of double-precision floating point numbers.

    y

    Numerator input array of double-precision floating point numbers.

    x

    Denominator input array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Computes the remainders after dividing values in a pair of arrays.

    Declaration

    Swift

    func vvfmodf(_ result: UnsafeMutablePointer<Float>, _ divisors: UnsafePointer<Float>, _ dividends: UnsafePointer<Float>, _ count: UnsafePointer<Int32>)

    Objective-C

    void vvfmodf ( float *, const float *, const float *, const int * );

    Parameters

    result

    An array, modified on return, where the results are stored.

    divisors

    An array of divisors.

    dividends

    An array of dividends.

    count

    The number of values in the input and result arrays.

    Discussion

    On return, the result array contains the remainders after calculating dividend[i] / divisor[i] for each value of i from 0 through count-1.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each double-precision array element, sets y to the integer truncation of x.

    Declaration

    Swift

    func vvint(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvint ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the integer truncation of x.

    Declaration

    Swift

    func vvintf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvintf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element z[i] to the next machine-representable value from y[i] towards x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvnextafter(_ z: UnsafeMutablePointer<Double>, _ y: UnsafePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvnextafter ( double *, const double *, const double *, const int * );

    Parameters

    z

    An output array of double-precision floating point numbers.

    y

    An input array of double-precision floating point numbers.

    x

    An input array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Discussion

    Not all values can be represented as a floating-point value of a given precision. This function sets a value in z[i] that is either minimally larger than the value in y[i] (if x[i] is larger than y[i]) or minimally smaller than the value in y[i] (if x[i] is smaller than y[i]).

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element z[i] to the next machine-representable value from y[i] towards x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvnextafterf(_ z: UnsafeMutablePointer<Float>, _ y: UnsafePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvnextafterf ( float *, const float *, const float *, const int * );

    Parameters

    z

    An array where results are stored on return.

    y

    An array of floating-point values providing the direction relative to x.

    x

    An array of floating-point values providing the starting point.

    n

    A pointer to an integer containing the number of elements to process.

    Discussion

    Not all values can be represented as a floating-point value of a given precision. This function sets a value in z[i] that is either minimally larger than the value in y[i] (if x[i] is larger than y[i]) or minimally smaller than the value in y[i] (if x[i] is smaller than y[i]).

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each double-precision array element, sets y to the nearest integer to x.

    Declaration

    Swift

    func vvnint(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvnint ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the nearest integer to x.

    Declaration

    Swift

    func vvnintf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvnintf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the reciprocal of the square root of x.

    Declaration

    Swift

    func vvrsqrt(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvrsqrt ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the reciprocal of the square root of x.

    Declaration

    Swift

    func vvrsqrtf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvrsqrtf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the square root of x.

    Declaration

    Swift

    func vvsqrt(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsqrt ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the square root of x.

    Declaration

    Swift

    func vvsqrtf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsqrtf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the reciprocal of y.

    Declaration

    Swift

    func vvrec(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvrec ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the reciprocal of y.

    Declaration

    Swift

    func vvrecf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvrecf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets z[i] to the remainder relative to a round-to-even division of y[i]/x[i] for each i in 0..n-1.

    Declaration

    Swift

    func vvremainder(_ z: UnsafeMutablePointer<Double>, _ y: UnsafePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvremainder ( double *, const double *, const double *, const int * );

    Parameters

    z

    An array for storing the results.

    y

    An array of divisors.

    x

    An array of dividends.

    n

    A pointer to an integer containing the number of elements to process.

    Discussion

    This function performs the equivalent of vnintf for each dividend/divisor pair, then multiplies the result by the divisor, and subtracts the result from the dividend.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Computes the remainder relative to a round-to-even division.

    Declaration

    Swift

    func vvremainderf(_ results: UnsafeMutablePointer<Float>, _ divisors: UnsafePointer<Float>, _ dividends: UnsafePointer<Float>, _ count: UnsafePointer<Int32>)

    Objective-C

    void vvremainderf ( float *, const float *, const float *, const int * );

    Parameters

    results

    An array for storing the results.

    divisors

    An array of divisors.

    dividends

    An array of dividends.

    count

    A pointer to an integer containing the number of elements to process.

    Discussion

    This function performs the equivalent of vnintf for each dividend/divisor pair, then multiplies the result by the divisor, and subtracts the result from the dividend.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each double-precision array element, sets y to the exponential of x.

    Declaration

    Swift

    func vvexp(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvexp ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the exponential of x.

    Declaration

    Objective-C

    void vvexpf ( float *, const float *, const int * );

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to 2 raised to (x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvexp2(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvexp2 ( double *, const double *, const int * );

    Parameters

    y

    An input array of double-precision floating point numbers

    x

    An output array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element y[i] to 2 raised to (x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvexp2f(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvexp2f ( float *, const float *, const int * );

    Parameters

    y

    An input array of single-precision floating point values.

    x

    An output array of single-precision floating point values.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Returns (e^x)-1 for each element y[i].

    Declaration

    Swift

    func vvexpm1(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvexpm1 ( double *, const double *, const int * );

    Parameters

    y

    An input array of double-precision floating point numbers

    x

    An output array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Discussion

    This is accurate for very small values of x[i].

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Computes (e^x)-1 for each element in an array.

    Declaration

    Swift

    func vvexpm1f(_ result: UnsafeMutablePointer<Float>, _ src: UnsafePointer<Float>, _ count: UnsafePointer<Int32>)

    Objective-C

    void vvexpm1f ( float *, const float *, const int * );

    Parameters

    result

    An array, modified on return, where the results are stored.

    src

    The input array.

    count

    The number of values in the input and result arrays.

    Discussion

    Provides additional accuracy for values of x near -1.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each double-precision array element, sets y to the natural logarithm of x.

    Declaration

    Swift

    func vvlog(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvlog ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the natural logarithm of x.

    Declaration

    Swift

    func vvlogf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvlogf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to log(1+x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvlog1p(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvlog1p ( double *, const double *, const int * );

    Parameters

    y

    An output array of double-precision floating point numbers.

    x

    An input array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Computes the natural logarithm of a value plus 1.

    Declaration

    Swift

    func vvlog1pf(_ results: UnsafeMutablePointer<Float>, _ values: UnsafePointer<Float>, _ count: UnsafePointer<Int32>)

    Objective-C

    void vvlog1pf ( float *, const float *, const int * );

    Parameters

    results

    An array where results are stored on return.

    values

    The source array.

    count

    A pointer to an integer containing the number of elements to process.

    Discussion

    This algorithm computes

    log(1+x)

    for each element x in the source array.

    This algorithm is tuned to provide increased accuracy for values of x near 1.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • Sets each element y[i] to the base-2 logarithm of x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvlog2(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvlog2 ( double *, const double *, const int * );

    Parameters

    y

    An output array of double-precision floating point numbers.

    x

    An input array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element y[i] to the base 2 logarithm of x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvlog2f(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvlog2f ( float *, const float *, const int * );

    Parameters

    y

    An output array of single-precision floating point numbers.

    x

    An input array of single-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • For each double-precision array element, sets y to the base 10 logarithm of x.

    Declaration

    Swift

    func vvlog10(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvlog10 ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the base 10 logarithm of x.

    Declaration

    Swift

    func vvlog10f(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvlog10f ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to the exponent of x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvlogb(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvlogb ( double *, const double *, const int * );

    Parameters

    y

    An output array of double-precision floating point numbers.

    x

    An input array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Discussion

    Floating point numbers are internally represented as a mantissa multiplied times a base raised to an exponent. That exponent is returned in the output array.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element y[i] to the exponent of x[i] for i in 0..n-1.

    Declaration

    Swift

    func vvlogbf(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvlogbf ( float *, const float *, const int * );

    Parameters

    y

    An array where results are stored on return.

    x

    The source array.

    n

    A pointer to an integer containing the number of elements to process.

    Discussion

    Floating point numbers are internally represented as a mantissa multiplied times a base raised to an exponent. That exponent is returned in the output array.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.5 and later.

  • For each single-precision array element, sets z to x raised to the power of y.

    Declaration

    Swift

    func vvpowf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvpowf ( float *, const float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets z to x raised to the power of y.

    Declaration

    Swift

    func vvpow(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvpow ( double *, const double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the sine of x.

    Declaration

    Swift

    func vvsin(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsin ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the sine of x.

    Declaration

    Swift

    func vvsinf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsinf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets y[i] to sin(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvsinpi(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvsinpi ( double *, const double *, const int * );

    Parameters

    y

    An array where results are stored on return.

    x

    The source array.

    n

    A pointer to an integer containing the number of elements to process.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets y[i] to sin(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvsinpif(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvsinpif ( float *, const float *, const int * );

    Parameters

    y

    An array where results are stored on return.

    x

    The source array.

    n

    A pointer to an integer containing the number of elements to process.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • For each double-precision array element, sets y to the cosine of x.

    Declaration

    Swift

    func vvcos(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcos ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the cosine of x.

    Declaration

    Swift

    func vvcosf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcosf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets each element y[i] to the sin(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvcospi(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvcospi ( double *, const double *, const int * );

    Parameters

    y

    An input array of double-precision floating point numbers

    x

    An output array of double-precision floating point numbers.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets each element y[i] to the sin(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvcospif(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvcospif ( float *, const float *, const int * );

    Parameters

    y

    An input array of single-precision floating point values.

    x

    An output array of single-precision floating point values.

    n

    A pointer to an integer containing the number of floating point elements to set.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • For each double-precision array element, sets the real part of C to the cosine of x and the imaginary part of C to the sine of x, for n elements.

    Declaration

    Swift

    func vvcosisin(_ _: COpaquePointer, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcosisin ( __double_complex_t *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets the real part of C to the cosine of x and the imaginary part of C to the sine of x, for n elements.

    Declaration

    Swift

    func vvcosisinf(_ _: COpaquePointer, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcosisinf ( __float_complex_t *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets z to the sine of x and y to the cosine of x.

    Declaration

    Swift

    func vvsincos(_ _: UnsafeMutablePointer<Double>, _ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsincos ( double *, double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets z to the sine of x and y to the cosine of x.

    Declaration

    Swift

    func vvsincosf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsincosf ( float *, float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the tangent of x.

    Declaration

    Swift

    func vvtan(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvtan ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the tangent of x.

    Declaration

    Swift

    func vvtanf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvtanf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • Sets y[i] to tan(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvtanpi(_ y: UnsafeMutablePointer<Double>, _ x: UnsafePointer<Double>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvtanpi ( double *, const double *, const int * );

    Parameters

    y

    An array where results are stored on return.

    x

    The source array.

    n

    A pointer to an integer containing the number of elements to process.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • Sets y[i] to tan(pi * x[i]) for i in 0..n-1.

    Declaration

    Swift

    func vvtanpif(_ y: UnsafeMutablePointer<Float>, _ x: UnsafePointer<Float>, _ n: UnsafePointer<Int32>)

    Objective-C

    void vvtanpif ( float *, const float *, const int * );

    Parameters

    y

    An array where results are stored on return.

    x

    The source array.

    n

    A pointer to an integer containing the number of elements to process.

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.7 and later.

  • For each double-precision array element, sets y to the arcsine of x.

    Declaration

    Swift

    func vvasin(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvasin ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the arcsine of x.

    Declaration

    Swift

    func vvasinf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvasinf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the arccosine of x.

    Declaration

    Swift

    func vvacos(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvacos ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the arccosine of x.

    Declaration

    Swift

    func vvacosf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvacosf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the arctangent of x.

    Declaration

    Swift

    func vvatan(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatan ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the arctangent of x.

    Declaration

    Swift

    func vvatanf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatanf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets z to the arctangent of y/x.

    Declaration

    Swift

    func vvatan2(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatan2 ( double *, const double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets z to the arctangent of y/x.

    Declaration

    Swift

    func vvatan2f(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatan2f ( float *, const float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the hyperbolic sine of x.

    Declaration

    Swift

    func vvsinhf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsinhf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the hyperbolic sine of x.

    Declaration

    Swift

    func vvsinh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvsinh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the hyperbolic cosine of x.

    Declaration

    Swift

    func vvcoshf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcoshf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the hyperbolic cosine of x.

    Declaration

    Swift

    func vvcosh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvcosh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the hyperbolic tangent of x.

    Declaration

    Swift

    func vvtanhf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvtanhf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the hyperbolic tangent of x.

    Declaration

    Swift

    func vvtanh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvtanh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the inverse hyperbolic sine of x.

    Declaration

    Swift

    func vvasinhf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvasinhf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the inverse hyperbolic sine of x.

    Declaration

    Swift

    func vvasinh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvasinh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the inverse hyperbolic cosine of x.

    Declaration

    Swift

    func vvacoshf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvacoshf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the inverse hyperbolic cosine of x.

    Declaration

    Swift

    func vvacosh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvacosh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each single-precision array element, sets y to the inverse hyperbolic tangent of x.

    Declaration

    Swift

    func vvatanhf(_ _: UnsafeMutablePointer<Float>, _ _: UnsafePointer<Float>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatanhf ( float *, const float *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • For each double-precision array element, sets y to the inverse hyperbolic tangent of x.

    Declaration

    Swift

    func vvatanh(_ _: UnsafeMutablePointer<Double>, _ _: UnsafePointer<Double>, _ _: UnsafePointer<Int32>)

    Objective-C

    void vvatanh ( double *, const double *, const int * );

    Import Statement

    import Accelerate

    Availability

    Available in OS X v10.4 and later.

  • 256-bit logical left shift.

    Declaration

    Swift

    func vLL256Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLL256Shift ( const vU256 *a, uint32_t shiftAmount, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 256-bit logical right shift.

    Declaration

    Swift

    func vLR256Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLR256Shift ( const vU256 *a, uint32_t shiftAmount, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 256-bit arithmetic shift.

    Declaration

    Swift

    func vA256Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vA256Shift ( const vS256 *a, uint32_t shiftAmount, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 512-bit logical left shift.

    Declaration

    Swift

    func vLL512Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLL512Shift ( const vU512 *a, uint32_t shiftAmount, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 512-bit logical right shift .

    Declaration

    Swift

    func vLR512Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLR512Shift ( const vU512 *a, uint32_t shiftAmount, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 512-bit arithmetic shift.

    Declaration

    Swift

    func vA512Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vA512Shift ( const vS512 *a, uint32_t shiftAmount, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 1024-bit logical left shift.

    Declaration

    Swift

    func vLL1024Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLL1024Shift ( const vU1024 *a, uint32_t shiftAmount, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 1024-bit logical right shift .

    Declaration

    Swift

    func vLR1024Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vLR1024Shift ( const vU1024 *a, uint32_t shiftAmount, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 1024-bit arithmetic shift.

    Declaration

    Swift

    func vA1024Shift(_ a: COpaquePointer, _ shiftAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vA1024Shift ( const vS1024 *a, uint32_t shiftAmount, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 256-bit left rotate.

    Declaration

    Swift

    func vL256Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vL256Rotate ( const vU256 *a, uint32_t rotateAmount, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 256-bit right rotate.

    Declaration

    Swift

    func vR256Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vR256Rotate ( const vU256 *a, uint32_t rotateAmount, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 512-bit left rotate.

    Declaration

    Swift

    func vL512Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vL512Rotate ( const vU512 *a, uint32_t rotateAmount, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 512-bit right rotate.

    Declaration

    Swift

    func vR512Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vR512Rotate ( const vU512 *a, uint32_t rotateAmount, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 1024-bit left rotate.

    Declaration

    Swift

    func vL1024Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vL1024Rotate ( const vU1024 *a, uint32_t rotateAmount, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • 1024-bit right rotate.

    Declaration

    Swift

    func vR1024Rotate(_ a: COpaquePointer, _ rotateAmount: UInt32, _ result: COpaquePointer)

    Objective-C

    void vR1024Rotate ( const vU1024 *a, uint32_t rotateAmount, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit addition (modular arithmetic).

    Declaration

    Swift

    func vU256Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256Add ( const vU256 *a, const vU256 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit addition with saturation (clipping).

    Declaration

    Swift

    func vU256AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256AddS ( const vU256 *a, const vU256 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit addition (modular arithmetic).

    Declaration

    Swift

    func vS256Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256Add ( const vS256 *a, const vS256 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit addition with saturation (clipping).

    Declaration

    Swift

    func vS256AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256AddS ( const vS256 *a, const vS256 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit addition (modular arithmetic).

    Declaration

    Swift

    func vU512Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512Add ( const vU512 *a, const vU512 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit addition with saturation (clipping).

    Declaration

    Swift

    func vU512AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512AddS ( const vU512 *a, const vU512 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit addition (modular arithmetic).

    Declaration

    Swift

    func vS512Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512Add ( const vS512 *a, const vS512 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit addition with saturation (clipping).

    Declaration

    Swift

    func vS512AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512AddS ( const vS512 *a, const vS512 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit addition (modular arithmetic).

    Declaration

    Swift

    func vU1024Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024Add ( const vU1024 *a, const vU1024 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit addition with saturation (clipping).

    Declaration

    Swift

    func vU1024AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024AddS ( const vU1024 *a, const vU1024 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit addition (modular arithmetic).

    Declaration

    Swift

    func vS1024Add(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024Add ( const vS1024 *a, const vS1024 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit addition with saturation (clipping).

    Declaration

    Swift

    func vS1024AddS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024AddS ( const vS1024 *a, const vS1024 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vU256Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256Sub ( const vU256 *a, const vU256 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vU256SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256SubS ( const vU256 *a, const vU256 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vS256Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256Sub ( const vS256 *a, const vS256 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vS256SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256SubS ( const vS256 *a, const vS256 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vU512Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512Sub ( const vU512 *a, const vU512 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vU512SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512SubS ( const vU512 *a, const vU512 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vS512Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512Sub ( const vS512 *a, const vS512 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vS512SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512SubS ( const vS512 *a, const vS512 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vU1024Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024Sub ( const vU1024 *a, const vU1024 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vU1024SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024SubS ( const vU1024 *a, const vU1024 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit subtraction (modular arithmetic).

    Declaration

    Swift

    func vS1024Sub(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024Sub ( const vS1024 *a, const vS1024 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit subtraction with saturation (clipping).

    Declaration

    Swift

    func vS1024SubS(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024SubS ( const vS1024 *a, const vS1024 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 64-bit negation.

    Declaration

    Objective-C

    vUInt32 vU64Neg ( vUInt32 vA );

    Parameters

    vA

    The value to negate.

    Return Value

    Returns the negated value.

    Import Statement

    Availability

    Available in OS X v10.0 and later.

  • Unsigned 128-bit negation.

    Declaration

    Objective-C

    vUInt32 vU128Neg ( vUInt32 vA );

    Parameters

    vA

    The value to negate.

    Return Value

    Returns the negated value.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Unsigned 256-bit negation.

    Declaration

    Swift

    func vU256Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256Neg ( const vU256 *a, vU256 *result );

    Parameters

    vA

    The value to negate.

    Return Value

    Returns the negated value.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 64-bit negation.

    Declaration

    Objective-C

    vSInt32 vS64Neg ( vSInt32 vA );

    Parameters

    vA

    The value to negate.

    Return Value

    Returns the negated value.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Signed 128-bit negation.

    Declaration

    Objective-C

    vSInt32 vS128Neg ( vSInt32 vA );

    Parameters

    vA

    The value to negate.

    Return Value

    Returns the negated value.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

  • Signed 256-bit negation.

    Declaration

    Swift

    func vS256Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256Neg ( const vS256 *a, vS256 *result );

    Parameters

    a

    The value to negate.

    Return Value

    Returns the negated value through the result parameter.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit negation.

    Declaration

    Swift

    func vU512Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512Neg ( const vU512 *a, vU512 *result );

    Parameters

    a

    The value to negate.

    Return Value

    Returns the negated value through the result parameter.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit negation.

    Declaration

    Swift

    func vS512Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512Neg ( const vS512 *a, vS512 *result );

    Parameters

    a

    The value to negate.

    Return Value

    Returns the negated value through the result parameter.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit negation.

    Declaration

    Swift

    func vU1024Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024Neg ( const vU1024 *a, vU1024 *result );

    Parameters

    a

    The value to negate.

    Return Value

    Returns the negated value through the result parameter.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit negation.

    Declaration

    Swift

    func vS1024Neg(_ a: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024Neg ( const vS1024 *a, vS1024 *result );

    Parameters

    a

    The value to negate.

    Return Value

    Returns the negated value through the result parameter.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit mod.

    Declaration

    Swift

    func vU256Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU256Mod ( const vU256 *numerator, const vU256 *divisor, vU256 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit mod.

    Declaration

    Swift

    func vS256Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS256Mod ( const vS256 *numerator, const vS256 *divisor, vS256 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit mod.

    Declaration

    Swift

    func vU512Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU512Mod ( const vU512 *numerator, const vU512 *divisor, vU512 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit mod.

    Declaration

    Swift

    func vS512Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS512Mod ( const vS512 *numerator, const vS512 *divisor, vS512 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit mod.

    Declaration

    Swift

    func vU1024Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU1024Mod ( const vU1024 *numerator, const vU1024 *divisor, vU1024 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit Mod.

    Declaration

    Swift

    func vS1024Mod(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS1024Mod ( const vS1024 *numerator, const vS1024 *divisor, vS1024 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vU256HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256HalfMultiply ( const vU256 *a, const vU256 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vS256HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256HalfMultiply ( const vS256 *a, const vS256 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vU512HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512HalfMultiply ( const vU512 *a, const vU512 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vS512HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512HalfMultiply ( const vS512 *a, const vS512 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vU1024HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU1024HalfMultiply ( const vU1024 *a, const vU1024 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit multiplication; result is the same width as multiplicands.

    Declaration

    Swift

    func vS1024HalfMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS1024HalfMultiply ( const vS1024 *a, const vS1024 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 128-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vU128FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU128FullMultiply ( const vU128 *a, const vU128 *b, vU256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 128-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vS128FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS128FullMultiply ( const vS128 *a, const vS128 *b, vS256 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vU256FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU256FullMultiply ( const vU256 *a, const vU256 *b, vU512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vS256FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS256FullMultiply ( const vS256 *a, const vS256 *b, vS512 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vU512FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vU512FullMultiply ( const vU512 *a, const vU512 *b, vU1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit multiplication; result is twice as wide as multiplicands.

    Declaration

    Swift

    func vS512FullMultiply(_ a: COpaquePointer, _ b: COpaquePointer, _ result: COpaquePointer)

    Objective-C

    void vS512FullMultiply ( const vS512 *a, const vS512 *b, vS1024 *result );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 256-bit division.

    Declaration

    Swift

    func vU256Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU256Divide ( const vU256 *numerator, const vU256 *divisor, vU256 *result, vU256 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 256-bit division.

    Declaration

    Swift

    func vS256Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS256Divide ( const vS256 *numerator, const vS256 *divisor, vS256 *result, vS256 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 512-bit division.

    Declaration

    Swift

    func vU512Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU512Divide ( const vU512 *numerator, const vU512 *divisor, vU512 *result, vU512 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 512-bit division.

    Declaration

    Swift

    func vS512Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS512Divide ( const vS512 *numerator, const vS512 *divisor, vS512 *result, vS512 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Unsigned 1024-bit division.

    Declaration

    Swift

    func vU1024Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vU1024Divide ( const vU1024 *numerator, const vU1024 *divisor, vU1024 *result, vU1024 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Signed 1024-bit division.

    Declaration

    Swift

    func vS1024Divide(_ numerator: COpaquePointer, _ divisor: COpaquePointer, _ result: COpaquePointer, _ remainder: COpaquePointer)

    Objective-C

    void vS1024Divide ( const vS1024 *numerator, const vS1024 *divisor, vS1024 *result, vS1024 *remainder );

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the position of the first vector element having the largest absolute value.

    Declaration

    Swift

    func vIsamax(_ count: Int32, _ x: COpaquePointer) -> Int32

    Objective-C

    int32_t vIsamax ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The index of the first element having the largest absolute value in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the position of the first vector element having the smallest absolute value.

    Declaration

    Swift

    func vIsamin(_ count: Int32, _ x: COpaquePointer) -> Int32

    Objective-C

    int32_t vIsamin ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The index of the first element having the smallest absolute value in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the position of the first vector element having the maximum value.

    Declaration

    Swift

    func vIsmax(_ count: Int32, _ x: COpaquePointer) -> Int32

    Objective-C

    int32_t vIsmax ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The index of the first element having the maximum value in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the position of the first vector element having the minimum value.

    Declaration

    Swift

    func vIsmin(_ count: Int32, _ x: COpaquePointer) -> Int32

    Objective-C

    int32_t vIsmin ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The index of the first element having the minimum value in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the sum of the absolute values of the elements in a vector.

    Declaration

    Swift

    func vSasum(_ count: Int32, _ x: COpaquePointer) -> Float

    Objective-C

    float vSasum ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The sum of the absolute values of the elements in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the sum of the values of the elements in a vector.

    Declaration

    Swift

    func vSsum(_ count: Int32, _ x: COpaquePointer) -> Float

    Objective-C

    float vSsum ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The sum of the values of the elements in the vector.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies a vector by a scalar , adds it to a second vector , and stores the result in the second vector.

    Declaration

    Swift

    func vSaxpy(_ n: Int32, _ alpha: Float, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSaxpy ( int32_t n, float alpha, const vFloat x[], vFloat y[] );

    Parameters

    n

    Number of elements in each of the vectors x and y; must be a multiple of 4.

    alpha

    A multiplier for the vector x.

    x

    A vector array of float values.

    y

    A second vector array of float values.

    Discussion

    The elements of x are multiplied by alpha and added to the corresponding elements of y. The results are stored in y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Performs the computation of vSaxpy n times, using a different multiplier each time.

    Declaration

    Swift

    func vSnaxpy(_ n: Int32, _ m: Int32, _ a: COpaquePointer, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSnaxpy ( int32_t n, int32_t m, const vFloat a[], const vFloat x[], vFloat y[] );

    Parameters

    n

    Number of elements in vector a; must be a multiple of 4.

    m

    Number of elements in each of the vectors x and y; must be a multiple of 4.

    x

    A vector array of float values.

    y

    A second vector array of float values.

    Discussion

    For i = 0 to n-1, the elements of x are multiplied by a[i] and added to the corresponding elements of y. The results are accumulated and stored in y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Copies one vector to another.

    Declaration

    Swift

    func vScopy(_ n: Int32, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vScopy ( int32_t n, const vFloat x[], vFloat y[] );

    Parameters

    n

    Number of elements in vectors x and y; must be a multiple of 4.

    x

    A vector array of float values.

    y

    A second vector array of float values.

    Discussion

    The elements of x are copied to the corresponding elements of y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Computes the dot product of two vectors.

    Declaration

    Swift

    func vSdot(_ n: Int32, _ x: COpaquePointer, _ y: COpaquePointer) -> Float

    Objective-C

    float vSdot ( int32_t n, const vFloat x[], const vFloat y[] );

    Parameters

    n

    Number of elements in vectors x and y; must be a multiple of 4.

    x

    A vector array of float values.

    y

    A second vector array of float values.

    Return Value

    The dot product of the two vectors.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Computes the dot products of n pairs of vectors, accumulating or storing the results in an array of n float values.

    Declaration

    Swift

    func vSndot(_ n: Int32, _ m: Int32, _ s: UnsafeMutablePointer<Float>, _ isw: Int32, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSndot ( int32_t n, int32_t m, float s[], int32_t isw, const vFloat x[], const vFloat y[] );

    Parameters

    n

    Number of dot products to compute, and number of elements in vector s ; must be a multiple of 4.

    m

    Number of elements in the vectors whose dot products are computed; must be a multiple of 4.

    s

    Destination vector; the n dot products are accumulated or stored here.

    isw

    A key that selects one of the four variants of this function: see Discussion below.

    x

    A matrix whose rows are n floating-point vectors, each containing m values.

    y

    A second matrix whose rows are n floating-point vectors, each containing m values.

    Discussion

    For i = 0 to n-1, the dot product of vectors x[i] and y[i] is computed. The dot product is accumulated or stored in s[i], according to the value of isw:

    • if isw = 1, the dot product is stored in s[i].

    • if isw = 2, the dot product is negated and then stored in s[i].

    • if isw = 3, the dot product is added to the value in s[i].

    • if isw = 4, the dot product is negated and then added to the value in s[i].

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the Euclidean length of a vector.

    Declaration

    Swift

    func vSnrm2(_ count: Int32, _ x: COpaquePointer) -> Float

    Objective-C

    float vSnrm2 ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The Euclidean length of x.

    Discussion

    Input is scaled to avoid destructive underflow and overflow.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Finds the Euclidean length of a vector.

    Declaration

    Swift

    func vSnorm2(_ count: Int32, _ x: COpaquePointer) -> Float

    Objective-C

    float vSnorm2 ( int32_t count, const vFloat x[] );

    Parameters

    count

    Number of elements in the vector x; must be a multiple of 4.

    x

    A vector array of float values.

    Return Value

    The Euclidean length of x.

    Discussion

    Input is not scaled.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Applies planar rotation to a set of n points whose x and y coordinates are contained in two arrays of vectors.

    Declaration

    Swift

    func vSrot(_ n: Int32, _ x: COpaquePointer, _ y: COpaquePointer, _ c: Float, _ s: Float)

    Objective-C

    void vSrot ( int32_t n, vFloat x[], vFloat y[], float c, float s );

    Parameters

    n

    number of points to be rotated; must be a multiple of 4.

    x

    vector with n/4 elements of type vector float, representing the x-coordinates of the points.

    y

    vector with n/4 elements of type vector float, representing the y-coordinates of the points.

    c

    cosine of the angle of rotation.

    s

    sine of the angle of rotation.

    Discussion

    The coordinates are modified in place in the vectors in arrays x and y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Scales a vector in place.

    Declaration

    Swift

    func vSscal(_ n: Int32, _ alpha: Float, _ v: COpaquePointer)

    Objective-C

    void vSscal ( int32_t n, float alpha, vFloat x[] );

    Parameters

    n

    number of elements in vector x; must be a multiple of 4.

    alpha

    scaling factor.

    v

    vector with n elements of type float.

    Discussion

    Each element of vector x is multiplied in place by alpha.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Interchanges the elements of two vectors.

    Declaration

    Swift

    func vSswap(_ n: Int32, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSswap ( int32_t n, vFloat x[], vFloat y[] );

    Parameters

    n

    number of elements in vectors x and y; must be a multiple of 4.

    x

    vector with n elements of type float.

    y

    vector with n elements of type float.

    Discussion

    Each element of vector x is replaced by the corresponding element of y, and vice versa.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies each element of a vector and stores the results in a second vector.

    Declaration

    Swift

    func vSyax(_ n: Int32, _ alpha: Float, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSyax ( int32_t n, float alpha, const vFloat x[], vFloat y[] );

    Parameters

    n

    number of elements in vectors x and y; must be a multiple of 4.

    alpha

    multiplier.

    x

    source vector with n elements of type float.

    y

    destination vector with n elements of type float.

    Discussion

    Each element of vector x is multiplied by alpha, and stored in the corresponding element of y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies a vector by a scalar, adds it to a second vector, and stores the result in a third vector.

    Declaration

    Swift

    func vSzaxpy(_ n: Int32, _ alpha: Float, _ x: COpaquePointer, _ yY: COpaquePointer, _ z: COpaquePointer)

    Objective-C

    void vSzaxpy ( int32_t n, float alpha, const vFloat x[], const vFloat yY[], vFloat z[] );

    Parameters

    n

    number of elements in vectors x, y, and z; must be a multiple of 4.

    alpha

    multiplier.

    x

    source vector with n elements of type float.

    yY

    source vector with n elements of type float.

    z

    destination vector with n elements of type float.

    Discussion

    Each element of vector x is multiplied by alpha, then the corresponding element of yY is added. Results are stored in the corresponding elements of z.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies a vector by a scalar. Multiplies a matrix by another scalar, then by a second vector, and adds the resulting vector to the first vector. This function can also perform the calculation with the transpose of the original matrix instead of the matrix itself. A selector parameter determines whether the transpose is used.

    Declaration

    Swift

    func vSgemv(_ forma: Int8, _ m: Int32, _ n: Int32, _ alpha: Float, _ a: COpaquePointer, _ x: COpaquePointer, _ beta: Float, _ y: COpaquePointer)

    Objective-C

    void vSgemv ( char forma, int32_t m, int32_t n, float alpha, const vFloat a[], const vFloat x[], float beta, vFloat y[] );

    Parameters

    forma

    selects the variant computation to be performed: ‘T’ causes the transpose of matrix a to be used, ‘N’ causes a itself to be used.

    m

    number of rows in a. If forma = ‘N’, m is the length of vector y; if forma = ‘T’, m is the length of vector x; must be a multiple of 4.

    n

    number of columns in a. If forma = ‘N’, m is the length of vector x; if forma = ‘T’, m is the length of vector y; must be a multiple of 4.

    alpha

    scalar multiplier for matrix a.

    a

    m by n matrix with elements of type float.

    x

    vector with elements of type float.

    beta

    scalar multiplier for vector y.

    y

    destination vector with n elements of type float.

    Discussion

    Vector y is multiplied by beta. Matrix a is multiplied by alpha. Then if forma = ‘N’, a is multiplied by vector x; if forma = ‘T’, the transpose of a is multiplied by x. The resulting vector is added to vector y, and the results are stored in y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies a matrix by a scalar and then by a vector, and adds the resulting vector to a second vector.

    Declaration

    Swift

    func vSgemx(_ m: Int32, _ n: Int32, _ alpha: Float, _ a: COpaquePointer, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSgemx ( int32_t m, int32_t n, float alpha, const vFloat a[], const vFloat x[], vFloat y[] );

    Parameters

    m

    number of rows in a, and the length of vector y; must be a multiple of 4.

    n

    number of columns in a, and the length of vector x; must be a multiple of 4.

    alpha

    scalar multiplier for matrix a.

    a

    m by n matrix with elements of type float.

    x

    vector with elements of type float.

    y

    destination vector with n elements of type float.

    Discussion

    Matrix a is multiplied by alpha and then by vector x; the resulting vector is added to vector y, and the results are stored in y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Forms the transpose of a matrix, multiplies it by a scalar and then by a vector, and adds the resulting vector to a second vector.

    Declaration

    Swift

    func vSgemtx(_ m: Int32, _ n: Int32, _ alpha: Float, _ a: COpaquePointer, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSgemtx ( int32_t m, int32_t n, float alpha, const vFloat a[], const vFloat x[], vFloat y[] );

    Parameters

    m

    number of rows in a, and the length of vector y; must be a multiple of 4.

    n

    number of columns in a, and the length of vector x; must be a multiple of 4.

    alpha

    scalar multiplier for matrix a.

    a

    m by n matrix with elements of type float.

    x

    vector with elements of type float.

    y

    destination vector with n elements of type float.

    Discussion

    The transpose of matrix a is multiplied by alpha and then by vector x; the resulting vector is added to vector y, and the results are stored in y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Adds two general matrices or their transposes.

    Declaration

    Swift

    func vSgeadd(_ height: Int32, _ width: Int32, _ a: COpaquePointer, _ forma: Int8, _ b: COpaquePointer, _ formb: Int8, _ c: COpaquePointer)

    Objective-C

    void vSgeadd ( int32_t height, int32_t width, const vFloat a[], char forma, const vFloat b[], char formb, vFloat c[] );

    Parameters

    height

    number of rows in the matrices to be added; must be a multiple of 4.

    width

    number of columns in the matrices to be added; must be a multiple of 4.

    a

    a matrix with elements of type float. If forma = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If forma = ‘T’, the transpose is used and a has width rows and height columns.

    forma

    selector with a value of‘N’ or ‘T’.

    b

    a matrix with elements of type float. If formb = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If formb = ‘T’, the transpose is used and b has width rows and height columns.

    formb

    selector with a value of ‘N’ or ‘T’.

    c

    destination matrix with height rows and width columns.

    Discussion

    Matrix a (or its transpose) is added to matrix b (or its transpose); the result is stored in mactrix c.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Subtracts two general matrices or their transposes.

    Declaration

    Swift

    func vSgesub(_ height: Int32, _ width: Int32, _ a: COpaquePointer, _ forma: Int8, _ b: COpaquePointer, _ formb: Int8, _ c: COpaquePointer)

    Objective-C

    void vSgesub ( int32_t height, int32_t width, const vFloat a[], char forma, const vFloat b[], char formb, vFloat c[] );

    Parameters

    height

    number of rows in the matrices to be subtracted; must be a multiple of 4.

    width

    number of columns in the matrices to be subtracted; must be a multiple of 4.

    a

    a matrix with elements of type float. If forma = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If forma = ‘T’, the transpose is used and a has width rows and height columns.

    forma

    selector with a value of ‘N’ or ‘T’.

    b

    a matrix with elements of type float. If formb = ‘N’, the matrix itself is used in the calculation and it has height rows and width columns. If formb = ‘T’, the transpose is used and b has width rows and height columns.

    formb

    selector with a value of ‘N’ or ‘T’.

    c

    destination matrix with height rows and width columns.

    Discussion

    Matrix b (or its transpose) is subtracted from matrix a (or its transpose); the result is stored in mactrix c.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiplies two general matrices or their transposes.

    Declaration

    Swift

    func vSgemul(_ l: Int32, _ m: Int32, _ n: Int32, _ a: COpaquePointer, _ forma: Int8, _ b: COpaquePointer, _ formb: Int8, _ matrix: COpaquePointer)

    Objective-C

    void vSgemul ( int32_t l, int32_t m, int32_t n, const vFloat a[], char forma, const vFloat b[], char formb, vFloat matrix[] );

    Parameters

    l

    number of rows in matrix matrix; must be a multiple of 4.

    m

    if forma = ‘N’, m is the number of columns in matrix a ; if forma = ‘T’, m is the number of rows in matrix a. Also, if formb = ‘N’, m is the number of rows in matrix b; if formb = ‘T’, m is the number of columns in matrix b. m must be a multiple of 4.

    n

    number of columns in the matrix matrix; must be a multiple of 4.

    a

    a matrix with elements of type float. If forma = ‘N’, the matrix itself is used in the calculation and it has l rows and m columns. If forma = ‘T’, the transpose is used and a has m rows and l columns. Thus the matrix used in the calculation is l by m.

    forma

    selector with a value of ‘N’ or ‘T’.

    b

    a matrix with elements of type float. If formb = ‘N’, the matrix itself is used in the calculation and it has m rows and n columns. If formb = ‘T’, the transpose is used and b has n rows and m columns. Thus the matrix used in the calculation is m by n.

    formb

    selector with a value of ‘N’ or ‘T’.

    matrix

    destination matrix with l rows and n columns.

    Discussion

    Matrix a (or its transpose) is multiplied by matrix b (or its transpose); the result is stored in matrix matrix.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Multiples two general matrices or their transposes, then scales and adds a third.

    Declaration

    Swift

    func vSgemm(_ l: Int32, _ m: Int32, _ n: Int32, _ a: COpaquePointer, _ forma: Int8, _ b: COpaquePointer, _ formb: Int8, _ c: COpaquePointer, _ alpha: Float, _ beta: Float, _ matrix: COpaquePointer)

    Objective-C

    void vSgemm ( int32_t l, int32_t m, int32_t n, const vFloat a[], char forma, const vFloat b[], char formb, vFloat c[], float alpha, float beta, vFloat matrix[] );

    Parameters

    l

    number of rows in matrix c; must be a multiple of 4.

    m

    if forma = ‘N’, m is the number of columns in matrix a ; if forma = ‘T’, m is the number of rows in matrix a. Also, if formb = ‘N’, m is the number of rows in matrix b; if formb = ‘T’, m is the number of columns in matrix b. m must be a multiple of 4.

    n

    number of columns in matrix c; must be a multiple of 4.

    a

    a matrix with elements of type float. If forma = ‘N’, the matrix itself is used in the calculation and it has l rows and m columns. If forma = ‘T’, the transpose is used and a has m rows and l columns. Thus the matrix used in the calculation is l by n.

    forma

    selector with a value of ‘N’ or ‘T’.

    b

    a matrix with elements of type float. If formb = ‘N’, the matrix itself is used in the calculation and it has m rows and n columns. If formb = ‘T’, the transpose is used and b has n rows and m columns. Thus the matrix used in the calculation is m by n.

    formb

    selector with a value of ‘N’ or ‘T’.

    c

    an l by n matrix with elements of type float.

    alpha

    multiplier for matrix a.

    beta

    multiplier for matrix c.

    matrix

    destination matrix with l rows and n columns.

    Discussion

    Matrix a (or its transpose) is multiplied by matrix b (or its transpose); matrix c is multiplied by beta, and the result is added to the result of the matrix multiplication; the result is stored in matrix matrix

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Transposes a matrix in place.

    Declaration

    Swift

    func vSgetmi(_ size: Int32, _ x: COpaquePointer)

    Objective-C

    void vSgetmi ( int32_t size, vFloat x[] );

    Parameters

    size

    number of rows and columns in matrix x; must be a multiple of 4.

    x

    square matrix with size rows and size columns.

    Discussion

    The matrix x is transposed in place.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Transposes a matrix out of place.

    Declaration

    Swift

    func vSgetmo(_ height: Int32, _ width: Int32, _ x: COpaquePointer, _ y: COpaquePointer)

    Objective-C

    void vSgetmo ( int32_t height, int32_t width, const vFloat x[], vFloat y[] );

    Parameters

    height

    number of rows in matrix x and number of columns in matrix y; must be a multiple of 4.

    width

    number of columns in matrix x and number of rows in matrix y; must be a multiple of 4.

    x

    matrix with height rows and width columns.

    y

    matrix with width rows and height columns.

    Discussion

    The matrix x is transposed into matrix y.

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • Produces the outer product of two vectors and places the results into a matrix.

    Declaration

    Swift

    func vSgevv(_ l: Int32, _ n: Int32, _ A: COpaquePointer, _ B: COpaquePointer, _ M: COpaquePointer)

    Objective-C

    void vSgevv ( int32_t l, int32_t n, const vFloat A[], const vFloat B[], vFloat M[] );

    Parameters

    l

    number of elements in vector A and the number of rows in matrix M; must be a multiple of 4.

    n

    number of elements in vector B and the number of columns in matrix M; must be a multiple of 4.

    A

    vector with l elements.

    B

    vector with n elements.

    M

    matrix with l rows and n columns.

    Discussion

    The vectors A and B are multiplied and the result is stored in matrix M, that is, for 0 <= i < l and 0 <= j < n, C[i*n + j] = A[i] * B[j]..

    Import Statement

    import Accelerate

    Availability

    OS X version 10.0 and later.

  • vvfabf vvfabf (OS X v10.7)

    Deprecated. Use vvfabsf instead.

    Declaration

    Objective-C

    void vvfabf ( float *, const float *, const int * );

    Parameters

    result

    An array, modified on return, where the results are stored.

    src

    The input array.

    count

    The number of values in the input and result arrays.

    Discussion

    Computes the absolute value of values in an array.

    Import Statement

    Availability

    Available in OS X v10.5 and later.

    Deprecated in OS X v10.7.

Data Types

All data structures passed to vecLib must be naturally aligned. For example, a 32-bit floating-point value must be aligned to a four-byte boundary. Many routines in vecLib generate exceptions on unaligned data.

  • A 128-bit vector packed with unsigned char values.

    Declaration

    Objective-C

    typedef vector unsigned char vUInt8;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with signed char values.

    Declaration

    Objective-C

    typedef vector signed char vSInt8;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with unsigned short values.

    Declaration

    Objective-C

    typedef vector unsigned short vUInt16;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with signed short values.

    Declaration

    Objective-C

    typedef vector signed short vSInt16;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with unsigned int values.

    Declaration

    Objective-C

    typedef vector unsigned int vUInt32;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with signed int values.

    Declaration

    Objective-C

    typedef vector signed int vSInt32;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with uint64_t values.

    Declaration

    Objective-C

    typedef vector unsigned int vUInt64;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with int64_t values.

    Declaration

    Objective-C

    typedef vector signed int vSInt64;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with float values.

    Declaration

    Objective-C

    typedef vector float vFloat;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A 128-bit vector packed with double values.

    Declaration

    Objective-C

    typedef double vDouble __attribute__((__vector_size__ (16)));

    Import Statement

  • A 128-bit vector packed with bool int values.

    Declaration

    Objective-C

    typedef vector bool int vBool32;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A single-precision complex number type.

    Declaration

    Objective-C

    typedef complex float __float_complex_t;

    Import Statement

  • A double-precision complex number type.

    Declaration

    Objective-C

    typedef complex double __double_complex_t;

    Import Statement

  • A union containing one vUInt32 vector or four 32-bit integers, representing a 128-bit unsigned integer.

    Declaration

    Objective-C

    union vU128 { vUInt32 v; struct { vUInt32 v1; } vs; struct { UInt32 MSW; UInt32 d2; UInt32 d3; UInt32 LSW; } s; }; typedef union vU128 vU128;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing one vSInt32 vector or four 32-bit integers, representing a 128-bit signed integer.

    Declaration

    Objective-C

    union vS128 { vUInt32 v; struct { vUInt32 v1; } vs; struct { SInt32 MSW; UInt32 d2; UInt32 d3; UInt32 LSW; } s; }; typedef union vS128 vS128;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of two vUInt32 vectors or eight 32-bit integers, representing a 256-bit unsigned integer.

    Declaration

    Objective-C

    union vU256 { vUInt32 v[2]; struct { vUInt32 v1; vUInt32 v2; } vs; struct { UInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 LSW; } s; }; typedef union vU256 vU256;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of two vUInt32 vectors or eight 32-bit integers, representing a 256-bit signed integer.

    Declaration

    Objective-C

    union vS256 { vUInt32 v[2]; struct { vUInt32 v1; vUInt32 v2; } vs; struct { SInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 LSW; } s; }; typedef union vS256 vS256;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of four vUInt32 vectors or sixteen 32-bit integers, representing a 256-bit unsigned integer.

    Declaration

    Objective-C

    union vU512 { vUInt32 v[4]; struct { vUInt32 v1; vUInt32 v2; vUInt32 v3; vUInt32 v4; } vs; struct { UInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 d8; UInt32 d9; UInt32 d10; UInt32 d11; UInt32 d12; UInt32 d13; UInt32 d14; UInt32 d15; UInt32 LSW; } s; }; typedef union vU512 vU512;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of four vUInt32 vectors or sixteen 32-bit integers, representing a 256-bit signed integer.

    Declaration

    Objective-C

    union vS512 { vUInt32 v[4]; struct { vUInt32 v1; vUInt32 v2; vUInt32 v3; vUInt32 v4; } vs; struct { SInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 d8; UInt32 d9; UInt32 d10; UInt32 d11; UInt32 d12; UInt32 d13; UInt32 d14; UInt32 d15; UInt32 LSW; } s; }; typedef union vS512 vS512;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of eight vUInt32 vectors or thirty-two 32-bit integers, representing a 1024-bit unsigned integer.

    Declaration

    Objective-C

    union vU1024 { vUInt32 v[8]; struct { vUInt32 v1; vUInt32 v2; vUInt32 v3; vUInt32 v4; vUInt32 v5; vUInt32 v6; vUInt32 v7; vUInt32 v8; } vs; struct { UInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 d8; UInt32 d9; UInt32 d10; UInt32 d11; UInt32 d12; UInt32 d13; UInt32 d14; UInt32 d15; UInt32 d16; UInt32 d17; UInt32 d18; UInt32 d19; UInt32 d20; UInt32 d21; UInt32 d22; UInt32 d23; UInt32 d24; UInt32 d25; UInt32 d26; UInt32 d27; UInt32 d28; UInt32 d29; UInt32 d30; UInt32 d31; UInt32 LSW; } s; }; typedef union vU1024 vU1024;

    Import Statement

    Availability

    Available in OS X v10.4 and later.

  • A union containing an array or structure of eight vUInt32 vectors or thirty-two 32-bit integers, representing a 1024-bit signed integer.

    Declaration

    Objective-C

    union vS1024 { vUInt32 v[8]; struct { vUInt32 v1; vUInt32 v2; vUInt32 v3; vUInt32 v4; vUInt32 v5; vUInt32 v6; vUInt32 v7; vUInt32 v8; } vs; struct { SInt32 MSW; UInt32 d2; UInt32 d3; UInt32 d4; UInt32 d5; UInt32 d6; UInt32 d7; UInt32 d8; UInt32 d9; UInt32 d10; UInt32 d11; UInt32 d12; UInt32 d13; UInt32 d14; UInt32 d15; UInt32 d16; UInt32 d17; UInt32 d18; UInt32 d19; UInt32 d20; UInt32 d21; UInt32 d22; UInt32 d23; UInt32 d24; UInt32 d25; UInt32 d26; UInt32 d27; UInt32 d28; UInt32 d29; UInt32 d30; UInt32 d31; UInt32 LSW; } s; }; typedef union vS1024 vS1024;

    Import Statement

    Availability

    Available in OS X v10.4 and later.