iOS Developer Library

Developer

Accelerate Framework Reference BLAS Reference

Options
Deployment Target:

On This Page
Language:

BLAS Reference

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


Swift

import Accelerate

Objective-C

@import Accelerate;

The vecLib framework contains nine C header files (not counting vecLib.h which merely includes the others).

This document describes the functions declared in the header files cblas.h and vblas.h, which contain the interfaces for Apple’s implementation of the Basic Linear Algebra Subprograms (BLAS) API.

For More Information

Documentation on the BLAS standard, including reference implementations, can be found on the web starting from the BLAS FAQ page at these URLs (verified live as of July 2005): http://www.netlib.org/blas/faq.html and http://www.netlib.org/blas/blast-forum/blast-forum.html

Functions

  • Releases per-thread storage associated with BLAS.

    Declaration

    Objective-C

    void ATLU_DestroyThreadMemory ( void );

    Discussion

    Many BLAS functions parallelize computation to obtain performance from multiple CPU cores. These functions allocate thread memory. Call this function when you no longer need to call BLAS functions.

    Import Statement

    Objective-C

    @import Accelerate;

    Availability

    Available in iOS 4.0 and later.

    Deprecated in iOS 7.0.

  • Sets an error handler function.

    Declaration

    Swift

    func SetBLASParamErrorProc(_ ErrorProc: BLASParamErrorProc)

    Objective-C

    void SetBLASParamErrorProc ( BLASParamErrorProc __ErrorProc );

    Parameters

    ErrorProc

    The handler function BLAS should call when an error occurs (because of an invalid input, for example).

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Prints an error message.

    Declaration

    Objective-C

    int cblas_errprn ( int __ierr, int __info, char *__form, ... );

    Parameters

    ierr

    Error code number.

    info

    Exit status returned by the function call. Negative values generally indicate the index of the offending parameter. Positive numbers generally indicate that an algorithm did not converge. Zero indicates success.

    form

    A printf-style format string.

    ...

    Arguments for the format string.

    Return Value

    Returns the minimum of ierr or info.

    Discussion

    This is commonly called by cblas_xerbla.

    Import Statement

    Objective-C

    @import Accelerate;

    Availability

    Available in iOS 4.0 and later.

  • The default error handler for BLAS routines.

    Declaration

    Objective-C

    void cblas_xerbla ( int __p, char *__rout, char *__form, ... );

    Parameters

    p

    The position of the invalid parameter

    rout

    The name of the routine that generated this error.

    form

    A format string describing the error.

    ...

    Additional parameters for the format string.

    Discussion

    This is the default error handler for BLAS functions. You can replace it with another function by calling SetBLASParamErrorProc.

    Import Statement

    Objective-C

    @import Accelerate;

    Availability

    Available in iOS 4.0 and later.

  • Returns the index of the element with the largest absolute value in a vector (single-precision complex).

    Declaration

    Swift

    func cblas_icamax(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32) -> Int32

    Objective-C

    int cblas_icamax ( const int __N, const void *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    The vector.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    Returns an index in the range 0..N-1 corresponding with the element with the largest absolute value.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Returns the index of the element with the largest absolute value in a vector (double-precision).

    Declaration

    Swift

    func cblas_idamax(_ N: Int32, _ X: UnsafePointer<Double>, _ incX: Int32) -> Int32

    Objective-C

    int cblas_idamax ( const int __N, const double *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    The vector.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    Returns an index in the range 0..N-1 corresponding with the element with the largest absolute value.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Returns the index of the element with the largest absolute value in a vector (single-precision).

    Declaration

    Swift

    func cblas_isamax(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32) -> Int32

    Objective-C

    int cblas_isamax ( const int __N, const float *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    The vector.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    Returns an index in the range 0..N-1 corresponding with the element with the largest absolute value.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Returns the index of the element with the largest absolute value in a vector (double-precision complex).

    Declaration

    Swift

    func cblas_izamax(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32) -> Int32

    Objective-C

    int cblas_izamax ( const int __N, const void *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    The vector.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    Returns an index in the range 0..N-1 corresponding with the element with the largest absolute value.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the product of two vectors, scaling each one separately (single-precision complex).

    Declaration

    Swift

    func catlas_caxpby(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void catlas_caxpby ( const int __N, const void *__alpha, const void *__X, const int __incX, const void *__beta, void *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vector.

    alpha

    Scaling factor for X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for Y.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Modifies a vector (single-precision complex) in place, setting each element to a given value.

    Declaration

    Swift

    func catlas_cset(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void catlas_cset ( const int __N, const void *__alpha, void *__X, const int __incX );

    Parameters

    N

    The number of elements in the vector.

    alpha

    The new value.

    X

    The vector to modify.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the product of two vectors, scaling each one separately (double-precision).

    Declaration

    Swift

    func catlas_daxpby(_ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void catlas_daxpby ( const int __N, const double __alpha, const double *__X, const int __incX, const double __beta, double *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vector.

    alpha

    Scaling factor for X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for Y.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Modifies a vector (double-precision) in place, setting each element to a given value.

    Declaration

    Swift

    func catlas_dset(_ N: Int32, _ alpha: Double, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void catlas_dset ( const int __N, const double __alpha, double *__X, const int __incX );

    Parameters

    N

    The number of elements in the vector.

    alpha

    The new value.

    X

    The vector to modify.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales the two input vectors separately, then adds the input vectors (single-precision).

    Declaration

    Swift

    func catlas_saxpby(_ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void catlas_saxpby ( const int __N, const float __alpha, const float *__X, const int __incX, const float __beta, float *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vector.

    alpha

    Scaling factor for X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for Y.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result.

    This function performs the following operation:

    • Y = (alpha * X) + (beta * Y)

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Modifies a vector (single-precision) in place, setting each element to a given value.

    Declaration

    Swift

    func catlas_sset(_ N: Int32, _ alpha: Float, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void catlas_sset ( const int __N, const float __alpha, float *__X, const int __incX );

    Parameters

    N

    The number of elements in the vector.

    alpha

    The new value.

    X

    The vector to modify.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the product of two vectors, scaling each one separately (double-precision complex).

    Declaration

    Swift

    func catlas_zaxpby(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void catlas_zaxpby ( const int __N, const void *__alpha, const void *__X, const int __incX, const void *__beta, void *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vector.

    alpha

    Scaling factor for X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for Y.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Modifies a vector (double-precision complex) in place, setting each element to a given value.

    Declaration

    Swift

    func catlas_zset(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void catlas_zset ( const int __N, const void *__alpha, void *__X, const int __incX );

    Parameters

    N

    The number of elements in the vector.

    alpha

    The new value.

    X

    The vector to modify.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the dot product of two vectors (single-precision).

    Declaration

    Swift

    func cblas_sdot(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32) -> Float

    Objective-C

    float cblas_sdot ( const int __N, const float *__X, const int __incX, const float *__Y, const int __incY );

    Parameters

    N

    The number of elements in the vectors.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the dot product of two single-precision vectors plus an initial single-precision value.

    Declaration

    Swift

    func cblas_sdsdot(_ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32) -> Float

    Objective-C

    float cblas_sdsdot ( const int __N, const float __alpha, const float *__X, const int __incX, const float *__Y, const int __incY );

    Parameters

    N

    The number of elements in the vectors.

    alpha

    The initial value to add to the dot product.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Calculates the dot product of the complex conjugate of a single-precision complex vector with a second single-precision complex vector.

    Declaration

    Swift

    func cblas_cdotc_sub(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ dotc: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_cdotc_sub ( const int __N, const void *__X, const int __incX, const void *__Y, const int __incY, void *__dotc );

    Parameters

    N

    Number of elements in vectors X and Y.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    dotc

    The result vector.

    Discussion

    Computes conjg(X) * Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the dot product of two single-precision complex vectors.

    Declaration

    Swift

    func cblas_cdotu_sub(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ dotu: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_cdotu_sub ( const int __N, const void *__X, const int __incX, const void *__Y, const int __incY, void *__dotu );

    Parameters

    N

    The length of vectors X and Y.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    dotu

    The result vector.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the dot product of two vectors (double-precision).

    Declaration

    Swift

    func cblas_ddot(_ N: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafePointer<Double>, _ incY: Int32) -> Double

    Objective-C

    double cblas_ddot ( const int __N, const double *__X, const int __incX, const double *__Y, const int __incY );

    Parameters

    N

    The number of elements in the vectors.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the double-precision dot product of a pair of single-precision vectors.

    Declaration

    Swift

    func cblas_dsdot(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32) -> Double

    Objective-C

    double cblas_dsdot ( const int __N, const float *__X, const int __incX, const float *__Y, const int __incY );

    Parameters

    N

    The number of elements in the vectors.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Calculates the dot product of the complex conjugate of a double-precision complex vector with a second double-precision complex vector.

    Declaration

    Swift

    func cblas_zdotc_sub(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ dotc: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_zdotc_sub ( const int __N, const void *__X, const int __incX, const void *__Y, const int __incY, void *__dotc );

    Parameters

    N

    Number of elements in vectors X and Y.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    dotc

    The result vector.

    Discussion

    Computes conjg(X) * Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the dot product of two double-precision complex vectors.

    Declaration

    Swift

    func cblas_zdotu_sub(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ dotu: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_zdotu_sub ( const int __N, const void *__X, const int __incX, const void *__Y, const int __incY, void *__dotu );

    Parameters

    N

    The length of vectors X and Y.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    dotu

    The result vector.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the sum of the absolute values of elements in a vector (single-precision).

    Declaration

    Swift

    func cblas_sasum(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32) -> Float

    Objective-C

    float cblas_sasum ( const int __N, const float *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    Source vector

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes a constant times a vector plus a vector (single-precision).

    Declaration

    Swift

    func cblas_saxpy(_ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_saxpy ( const int __N, const float __alpha, const float *__X, const int __incX, float *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    alpha

    Scaling factor for the values in X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result. The value computed is (alpha * X[i]) + Y[i].

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Copies a vector to another vector (single-precision).

    Declaration

    Swift

    func cblas_scopy(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_scopy ( const int __N, const float *__X, const int __incX, float *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    X

    Source vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Destination vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a general band matrix, then multiplies by a vector, then adds a vector (single precision).

    Declaration

    Swift

    func cblas_sgbmv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ KL: Int32, _ KU: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_sgbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const int __ KL , const int __ KU , const float __ alpha , const float *__ A , const int __ lda , const float *__ X , const int __ incX , const float __ beta , float *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    KL

    Number of subdiagonals in matrix A.

    KU

    Number of superdiagonals in matrix A.

    alpha

    Scaling factor to multiply matrix A by.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A. (Must be at least KL+KU+1.)

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor to multiply vector Y by.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y or alpha*A'*x + beta*y depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies two matrices (single-precision).

    Declaration

    Swift

    func cblas_sgemm(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ TransB: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ K: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ B: UnsafePointer<Float>, _ ldb: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Float>, _ ldc: Int32)

    Objective-C

    void cblas_sgemm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_TRANSPOSE __ TransB , const int __ M , const int __ N , const int __ K , const float __ alpha , const float *__ A , const int __ lda , const float *__ B , const int __ ldb , const float __ beta , float *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    TransB

    Specifies whether to transpose matrix B.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    K

    Number of columns in matrix A; number of rows in matrix B.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    with optional use of transposed forms of A, B, or both.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a vector (single precision).

    Declaration

    Swift

    func cblas_sgemv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_sgemv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const float __ alpha , const float *__ A , const int __ lda , const float *__ X , const int __ incX , const float __ beta , float *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for the product of matrix A and vector X.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector Y.

    Y

    Vector Y

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    This function multiplies A * X (after transposing A, if needed) and multiplies the resulting matrix by alpha. It then multiplies vector Y by beta. It stores the sum of these two products in vector Y.

    Thus, it calculates either

    Y←αAX + βY

    with optional use of the transposed form of A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies vector X by the transform of vector Y, then adds matrix A (single precison).

    Declaration

    Swift

    func cblas_sger(_ Order: CBLAS_ORDER, _ M: Int32, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32, _ A: UnsafeMutablePointer<Float>, _ lda: Int32)

    Objective-C

    void cblas_sger ( const enum CBLAS_ORDER __ Order , const int __ M , const int __ N , const float __ alpha , const float *__ X , const int __ incX , const float *__ Y , const int __ incY , float *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Computes alpha*x*y' + A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the L2 norm (Euclidian length) of a vector (single precision).

    Declaration

    Swift

    func cblas_snrm2(_ N: Int32, _ X: UnsafePointer<Float>, _ incX: Int32) -> Float

    Objective-C

    float cblas_snrm2 ( const int __N, const float *__X, const int __incX );

    Parameters

    N

    Length of vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Applies a Givens rotation matrix to a pair of vectors.

    Declaration

    Swift

    func cblas_srot(_ N: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32, _ c: Float, _ s: Float)

    Objective-C

    void cblas_srot ( const int __N, float *__X, const int __incX, float *__Y, const int __incY, const float __c, const float __s );

    Parameters

    N

    The number of elements in vectors X and Y.

    X

    Vector X. Modified on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y. Modified on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    c

    The value cos(θ) in the Givens rotation matrix.

    s

    The value sin(θ) in the Givens rotation matrix.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Constructs a Givens rotation matrix.

    Declaration

    Swift

    func cblas_srotg(_ a: UnsafeMutablePointer<Float>, _ b: UnsafeMutablePointer<Float>, _ c: UnsafeMutablePointer<Float>, _ s: UnsafeMutablePointer<Float>)

    Objective-C

    void cblas_srotg ( float *__a, float *__b, float *__c, float *__s );

    Parameters

    a

    Single-precision value a. Overwritten on return with result r.

    b

    Single-precision value b. Overwritten on return with result z (zero).

    c

    Unused on entry. Overwritten on return with the value cos(θ).

    s

    Unused on entry. Overwritten on return with the value sin(θ).

    Discussion

    Given a vertical matrix containing a and b, computes the values of cos θ and sin θ that zero the lower value (b). Returns the value of sin θ in s, the value of cos θ in c, and the upper value (r) in a.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Applies a modified Givens transformation (single precision).

    Declaration

    Swift

    func cblas_srotm(_ N: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32, _ P: UnsafePointer<Float>)

    Objective-C

    void cblas_srotm ( const int __N, float *__X, const int __incX, float *__Y, const int __incY, const float *__P );

    Parameters

    N

    Number of elements in vectors.

    X

    Vector X. Modified on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y. Modified on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    P

    A 5-element vector:

    P[0]

    Flag value that defines the form of matrix H.

    -2.0: matrix H contains the identity matrix.

    -1.0: matrix H is identical to matrix SH (defined by the remaining values in the vector).

    0.0: H[1,2] and H[2,1] are obtained from matrix SH. The remaining values are both 1.0.

    1.0: H[1,1] and H[2,2] are obtained from matrix SH. H[1,2] is 1.0. H[2,1] is -1.0.

    P[1]

    Contains SH[1,1].

    P[2]

    Contains SH[2,1].

    P[3]

    Contains SH[1,2].

    P[4]

    Contains SH[2,2].

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Generates a modified Givens rotation matrix.

    Declaration

    Swift

    func cblas_srotmg(_ d1: UnsafeMutablePointer<Float>, _ d2: UnsafeMutablePointer<Float>, _ b1: UnsafeMutablePointer<Float>, _ b2: Float, _ P: UnsafeMutablePointer<Float>)

    Objective-C

    void cblas_srotmg ( float *__d1, float *__d2, float *__b1, const float __b2, float *__P );

    Parameters

    d1

    Scaling factor D1.

    d2

    Scaling factor D2.

    b1

    Scaling factor B1.

    b2

    Scaling factor B2.

    P

    A 5-element vector:

    P[0]

    Flag value that defines the form of matrix H.

    -2.0: matrix H contains the identity matrix.

    -1.0: matrix H is identical to matrix SH (defined by the remaining values in the vector).

    0.0: H[1,2] and H[2,1] are obtained from matrix SH. The remaining values are both 1.0.

    1.0: H[1,1] and H[2,2] are obtained from matrix SH. H[1,2] is 1.0. H[2,1] is -1.0.

    P[1]

    Contains SH[1,1].

    P[2]

    Contains SH[2,1].

    P[3]

    Contains SH[1,2].

    P[4]

    Contains SH[2,2].

    Discussion

    The resulting matrix zeroes the second component of the vector (sqrt(D1)*B1, sqrt(SD2)*B2).

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a symmetric band matrix, then multiplies by a vector, then adds a vector (single-precision).

    Declaration

    Swift

    func cblas_ssbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ K: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_ssbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const int __ K , const float __ alpha , const float *__ A , const int __ lda , const float *__ X , const int __ incX , const float __ beta , float *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    alpha

    Scaling value to multiply matrix A by.

    A

    Matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector Y is multiplied by.

    Y

    Vector Y. Replaced by results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and returns the results in vector Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies each element of a vector by a constant (single-precision).

    Declaration

    Swift

    func cblas_sscal(_ N: Int32, _ alpha: Float, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_sscal ( const int __N, const float __alpha, float *__X, const int __incX );

    Parameters

    N

    Number of elements to scale.

    alpha

    The constant to multiply by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is multiplied by alpha.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a packed symmetric matrix, then multiplies by a vector, then scales and adds another vector (single precision).

    Declaration

    Swift

    func cblas_sspmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ Ap: UnsafePointer<Float>, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_sspmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ Ap , const float *__ X , const int __ incX , const float __ beta , float *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A and the number of elements in vectors x and y.

    alpha

    Scaling factor that matrix A is multiplied by.

    Ap

    Matrix A (in packed storage format).

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector y is multiplied by.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and stores the results in Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank one update: adds a packed symmetric matrix to the product of a scaling factor, a vector, and its transpose (single precision).

    Declaration

    Swift

    func cblas_sspr(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Ap: UnsafeMutablePointer<Float>)

    Objective-C

    void cblas_sspr ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ X , const int __ incX , float *__ Ap );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Ap

    Matrix A (in packed storage format).

    Discussion

    Calculates A + alpha*x*x and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank two update of a packed symmetric matrix using two vectors (single precision).

    Declaration

    Swift

    func cblas_sspr2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32, _ A: UnsafeMutablePointer<Float>)

    Objective-C

    void cblas_sspr2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ X , const int __ incX , const float *__ Y , const int __ incY , float *__ A );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A (in packed storage format).

    Discussion

    Calculates A + alpha*x*y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Exchanges the elements of two vectors (single precision).

    Declaration

    Swift

    func cblas_sswap(_ N: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_sswap ( const int __N, float *__X, const int __incX, float *__Y, const int __incY );

    Parameters

    N

    Number of elements in vectors

    X

    Vector x. On return, contains elements copied from vector y.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y. On return, contains elements copied from vector x.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a symmetric matrix (single-precision).

    Declaration

    Swift

    func cblas_ssymm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ M: Int32, _ N: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ B: UnsafePointer<Float>, _ ldb: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Float>, _ ldc: Int32)

    Objective-C

    void cblas_ssymm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const int __ M , const int __ N , const float __ alpha , const float *__ A , const int __ lda , const float *__ B , const int __ ldb , const float __ beta , float *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B or B * A (depending on the value of Side) and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    where

    A = A

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a symmetric matrix, multiplies by a vector, then scales and adds another vector (single precision).

    Declaration

    Swift

    func cblas_ssymv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafePointer<Float>, _ incX: Int32, _ beta: Float, _ Y: UnsafeMutablePointer<Float>, _ incY: Int32)

    Objective-C

    void cblas_ssymv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ A , const int __ lda , const float *__ X , const int __ incX , const float __ beta , float *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; length of vectors.

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector y.

    Y

    Vector y. Contains results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and stores the results in Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank one update: adds a symmetric matrix to the product of a scaling factor, a vector, and its transpose (single precision).

    Declaration

    Swift

    func cblas_ssyr(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ A: UnsafeMutablePointer<Float>, _ lda: Int32)

    Objective-C

    void cblas_ssyr ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ X , const int __ incX , float *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Calculates A + alpha*x*x and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank two update of a symmetric matrix using two vectors (single precision).

    Declaration

    Swift

    func cblas_ssyr2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Float>, _ incX: Int32, _ Y: UnsafePointer<Float>, _ incY: Int32, _ A: UnsafeMutablePointer<Float>, _ lda: Int32)

    Objective-C

    void cblas_ssyr2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const float *__ X , const int __ incX , const float *__ Y , const int __ incY , float *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Calculates A + alpha*x*y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Performs a rank-2k update of a symmetric matrix (single precision).

    Declaration

    Swift

    func cblas_ssyr2k(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ B: UnsafePointer<Float>, _ ldb: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Float>, _ ldc: Int32)

    Objective-C

    void cblas_ssyr2k ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const float __ alpha , const float *__ A , const int __ lda , const float *__ B , const int __ ldb , const float __ beta , float *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    N

    Order of matrix C.

    K

    Specifies the number of columns in matrices A and B if trans='N'.

    Specifies the number of rows if trans='C' or trans='T').

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of matrix A.

    B

    Matrix B.

    ldb

    Leading dimension of array containing matrix B.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Computes alpha*A*B

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank-k update—multiplies a symmetric matrix by its transpose and adds a second matrix (single precision).

    Declaration

    Swift

    func cblas_ssyrk(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Float>, _ ldc: Int32)

    Objective-C

    void cblas_ssyrk ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const float __ alpha , const float *__ A , const int __ lda , const float __ beta , float *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    N

    Order of matrix C.

    K

    Number of columns in matrix A (or number of rows if matrix A is transposed).

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Calculates alpha*A*A; if transposed, calculates alpha*A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular band matrix, then multiplies by a vector (single precision).

    Declaration

    Swift

    func cblas_stbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_stbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const float *__ A , const int __ lda , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    A

    Triangular matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x and stores the results in x.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular banded system of equations.

    Declaration

    Swift

    func cblas_stbsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_stbsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const float *__ A , const int __ lda , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    K

    Number of superdiagonals or subdiagonals of matrix A (depending on the value of Uplo).

    A

    Triangular matrix A.

    lda

    The leading dimension of matrix A.

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a triangular matrix by a vector, then adds a vector (single precision).

    Declaration

    Swift

    func cblas_stpmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Float>, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_stpmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const float *__ Ap , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A and the number of elements in vectors x and y.

    Ap

    Triangular matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x, A, or conjg(A and stores the results in X.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a packed triangular system of equations.

    Declaration

    Swift

    func cblas_stpsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Float>, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_stpsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const float *__ Ap , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    Ap

    Triangular matrix A (in packed storage format).

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular matrix and multiplies it by a matrix.

    Declaration

    Swift

    func cblas_strmm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ M: Int32, _ N: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ B: UnsafeMutablePointer<Float>, _ ldb: Int32)

    Objective-C

    void cblas_strmm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ M , const int __ N , const float __ alpha , const float *__ A , const int __ lda , float *__ B , const int __ ldb );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    M

    Number of rows in matrix B.

    N

    Number of columns in matrix B.

    alpha

    Scaling factor for matrix A.

    A

    Triangular matrix A.

    lda

    Leading dimension of matrix A.

    B

    Matrix B. Overwritten by results on return.

    ldb

    Leading dimension of matrix B.

    Discussion

    If Side is 'L', multiplies alpha*A*B or alpha*A'*B, depending on TransA.

    If Side is 'R', multiplies alpha*B*A or alpha*B*A', depending on TransA.

    In either case, the results are stored in matrix B.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a triangular matrix by a vector.

    Declaration

    Swift

    func cblas_strmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_strmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const float *__ A , const int __ lda , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    A

    Triangular matrix A.

    lda

    Leading dimension of matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Multiplies A*X or A'*X, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular system of equations with multiple values for the right side.

    Declaration

    Swift

    func cblas_strsm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ M: Int32, _ N: Int32, _ alpha: Float, _ A: UnsafePointer<Float>, _ lda: Int32, _ B: UnsafeMutablePointer<Float>, _ ldb: Int32)

    Objective-C

    void cblas_strsm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ M , const int __ N , const float __ alpha , const float *__ A , const int __ lda , float *__ B , const int __ ldb );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrix and vector should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    M

    The number of rows in matrix B.

    N

    The number of columns in matrix B.

    alpha

    Scaling factor for matrix A.

    A

    Triangular matrix A.

    lda

    The leading dimension of matrix B.

    B

    On entry, matrix B. Overwritten on return by matrix X.

    ldb

    The leading dimension of matrix B.

    Discussion

    If Side is 'L', solves A*X=alpha*B or A'*X=alpha*B, depending on TransA.

    If Side is 'R', solves X*A=alpha*B or X*A'=alpha*B, depending on TransA.

    In either case, the results overwrite the values of matrix B in X.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular system of equations with a single value for the right side.

    Declaration

    Swift

    func cblas_strsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ A: UnsafePointer<Float>, _ lda: Int32, _ X: UnsafeMutablePointer<Float>, _ incX: Int32)

    Objective-C

    void cblas_strsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const float *__ A , const int __ lda , float *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    The order of matrix A.

    A

    Triangular matrix A.

    lda

    The leading dimension of matrix B.

    X

    The vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves A*x=b or A'*x=b where x and b are elements in X and B.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes a constant times a vector plus a vector (single-precision complex).

    Declaration

    Swift

    func cblas_caxpy(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_caxpy ( const int __N, const void *__alpha, const void *__X, const int __incX, void *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    alpha

    Scaling factor for the values in X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result. The value computed is (alpha * X[i]) + Y[i].

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Copies a vector to another vector (single-precision complex).

    Declaration

    Swift

    func cblas_ccopy(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_ccopy ( const int __N, const void *__X, const int __incX, void *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    X

    Source vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Destination vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a general band matrix, then multiplies by a vector, then adds a vector (single-precision complex).

    Declaration

    Swift

    func cblas_cgbmv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ KL: Int32, _ KU: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_cgbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const int __ KL , const int __ KU , const void *__ alpha , const void *__ A , const int __ lda , const void *__ X , const int __ incX , const void *__ beta , void *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    KL

    Number of subdiagonals in matrix A.

    KU

    Number of superdiagonals in matrix A.

    alpha

    Scaling factor to multiply matrix A by.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A. (Must be at least KL+KU+1.)

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor to multiply vector Y by.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y, alpha*A'*x + beta*y, or alpha*conjg(A')*x + beta*y depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies two matrices (single-precision complex).

    Declaration

    Swift

    func cblas_cgemm(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ TransB: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ K: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafePointer<Void>, _ ldb: Int32, _ beta: UnsafePointer<Void>, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_cgemm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_TRANSPOSE __ TransB , const int __ M , const int __ N , const int __ K , const void *__ alpha , const void *__ A , const int __ lda , const void *__ B , const int __ ldb , const void *__ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    TransB

    Specifies whether to transpose matrix B.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    K

    Number of columns in matrix A; number of rows in matrix B.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    with optional use of transposed forms of A, B, or both.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a vector (single-precision complex).

    Declaration

    Swift

    func cblas_cgemv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_cgemv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , const void *__ X , const int __ incX , const void *__ beta , void *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for the product of matrix A and vector X.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector Y.

    Y

    Vector Y

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    This function multiplies A * X (after transposing A, if needed) and multiplies the resulting matrix by alpha. It then multiplies vector Y by beta. It stores the sum of these two products in vector Y.

    Thus, it calculates either

    Y←αAX + βY

    with optional use of the transposed form of A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies vector X by the conjugate transform of vector Y, then adds matrix A (single-precision complex).

    Declaration

    Swift

    func cblas_cgerc(_ Order: CBLAS_ORDER, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ A: UnsafeMutablePointer<Void>, _ lda: Int32)

    Objective-C

    void cblas_cgerc ( const enum CBLAS_ORDER __ Order , const int __ M , const int __ N , const void *__ alpha , const void *__ X , const int __ incX , const void *__ Y , const int __ incY , void *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Computes alpha*x*conjg(y') + A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies vector X by the transform of vector Y, then adds matrix A (single-precision complex).

    Declaration

    Swift

    func cblas_cgeru(_ Order: CBLAS_ORDER, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ A: UnsafeMutablePointer<Void>, _ lda: Int32)

    Objective-C

    void cblas_cgeru ( const enum CBLAS_ORDER __ Order , const int __ M , const int __ N , const void *__ alpha , const void *__ X , const int __ incX , const void *__ Y , const int __ incY , void *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Computes alpha*x*y' + A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a Hermitian band matrix, then multiplies by a vector, then adds a vector (single-precision complex).

    Declaration

    Swift

    func cblas_chbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ K: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_chbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const int __ K , const void *__ alpha , const void *__ A , const int __ lda , const void *__ X , const int __ incX , const void *__ beta , void *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    alpha

    Scaling value to multiply matrix A by.

    A

    Matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector Y is multiplied by.

    Y

    Vector Y. Replaced by results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and returns the results in vector Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies two Hermitian matrices (single-precision complex), then adds a third (with scaling).

    Declaration

    Swift

    func cblas_chemm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafePointer<Void>, _ ldb: Int32, _ beta: UnsafePointer<Void>, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_chemm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const int __ M , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , const void *__ B , const int __ ldb , const void *__ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    M

    The number of rows in matrices A and C.

    N

    The number of columns in matrices B and C.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B or B * A (depending on the value of Side) and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    where

    A = A

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales and multiplies a Hermitian matrix by a vector, then adds a second (scaled) vector.

    Declaration

    Swift

    func cblas_chemv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_chemv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , const void *__ X , const int __ incX , const void *__ beta , void *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector X.

    Y

    Vector Y. Overwritten by results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Calculates Y←αAX + βY.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Hermitian rank 1 update: adds the product of a scaling factor, vector X, and the conjugate transpose of X to matrix A.

    Declaration

    Swift

    func cblas_cher(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Void>, _ incX: Int32, _ A: UnsafeMutablePointer<Void>, _ lda: Int32)

    Objective-C

    void cblas_cher ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const void *__ X , const int __ incX , void *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    alpha

    The scaling factor for vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of matrix A.

    Discussion

    Computes A←αX*conjg(X') + βA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Hermitian rank 2 update: adds the product of a scaling factor, vector X, and the conjugate transpose of vector Y to the product of the conjugate of the scaling factor, vector Y, and the conjugate transpose of vector X, and adds the result to matrix A.

    Declaration

    Swift

    func cblas_cher2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ A: UnsafeMutablePointer<Void>, _ lda: Int32)

    Objective-C

    void cblas_cher2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const void *__ alpha , const void *__ X , const int __ incX , const void *__ Y , const int __ incY , void *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    alpha

    The scaling factor α.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    The leading dimension of matrix A.

    Discussion

    Computes A←αX*conjg(Y') + conjg(α)*Y*conjg(X') + A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Performs a rank-2k update of a complex Hermitian matrix (single-precision complex).

    Declaration

    Swift

    func cblas_cher2k(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafePointer<Void>, _ ldb: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_cher2k ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const void *__ alpha , const void *__ A , const int __ lda , const void *__ B , const int __ ldb , const float __ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    N

    Order of matrix C.

    K

    Specifies the number of columns in matrices A and B if trans='N'.

    Specifies the number of rows if trans='C' or trans='T').

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    B

    Matrix B.

    ldb

    Leading dimension of array containing matrix B.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Computes alpha*A*B

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank-k update—multiplies a Hermitian matrix by its transpose and adds a second matrix (single precision).

    Declaration

    Swift

    func cblas_cherk(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: Float, _ A: UnsafePointer<Void>, _ lda: Int32, _ beta: Float, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_cherk ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const float __ alpha , const void *__ A , const int __ lda , const float __ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n') or the conjugate transpose of A ('C' or 'c').

    N

    Order of matrix C.

    K

    Number of columns in matrix A (or number of rows if matrix A is transposed).

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Calculates alpha*A*A; if transposed, calculates alpha*A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a packed hermitian matrix, multiplies it by a vector, and adds a scaled vector.

    Declaration

    Swift

    func cblas_chpmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: UnsafePointer<Void>, _ Ap: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ beta: UnsafePointer<Void>, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_chpmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const void *__ alpha , const void *__ Ap , const void *__ X , const int __ incX , const void *__ beta , void *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A and the number of elements in vectors x and y.

    alpha

    Scaling factor that matrix A is multiplied by.

    Ap

    Matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector y is multiplied by.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and stores the results in Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales and multiplies a vector times its conjugate transpose, then adds a matrix.

    Declaration

    Swift

    func cblas_chpr(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Float, _ X: UnsafePointer<Void>, _ incX: Int32, _ A: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_chpr ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const float __ alpha , const void *__ X , const int __ incX , void *__ A );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A and the number of elements in vector x.

    alpha

    Scaling factor that vector x is multiplied by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    A

    Matrix A. Overwritten by results on return.

    Discussion

    Calculates alpha*x*conjg(x') + A and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a vector times the conjugate transpose of a second vector and vice-versa, sums the results, and adds a matrix.

    Declaration

    Swift

    func cblas_chpr2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafePointer<Void>, _ incX: Int32, _ Y: UnsafePointer<Void>, _ incY: Int32, _ Ap: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_chpr2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const void *__ alpha , const void *__ X , const int __ incX , const void *__ Y , const int __ incY , void *__ Ap );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A and the number of elements in vectors x and y.

    alpha

    Scaling factor that vector x is multiplied by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Ap

    Matrix A in packed storage format. Overwritten by the results on return.

    Discussion

    Calcuates alpha*x*conjg(y') + conjg(alpha)*y*conjg(x') + A, and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Constructs a complex Givens rotation.

    Declaration

    Swift

    func cblas_crotg(_ a: UnsafeMutablePointer<Void>, _ b: UnsafeMutablePointer<Void>, _ c: UnsafeMutablePointer<Void>, _ s: UnsafeMutablePointer<Void>)

    Objective-C

    void cblas_crotg ( void *__a, void *__b, void *__c, void *__s );

    Parameters

    a

    Complex value a. Overwritten on output.

    b

    Complex value a.

    c

    Real value c. Unused on entry. Overwritten on return with the value cos(θ).

    s

    Complex value s. Unused on entry. Overwritten on return with the value sin(θ).

    Discussion

    Given a vertical matrix containing a and b, computes the values of cos θ and sin θ that zero the lower value (b). Returns the value of sin θ in s, the value of cos θ in c, and the upper value (r) in a.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies each element of a vector by a constant (single-precision complex).

    Declaration

    Swift

    func cblas_cscal(_ N: Int32, _ alpha: UnsafePointer<Void>, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_cscal ( const int __N, const void *__alpha, void *__X, const int __incX );

    Parameters

    N

    The number of elements in the vector.

    alpha

    The constant scaling factor.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Applies a Givens rotation matrix to a pair of complex vectors.

    Declaration

    Swift

    func cblas_csrot(_ N: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32, _ c: Float, _ s: Float)

    Objective-C

    void cblas_csrot ( const int __N, void *__X, const int __incX, void *__Y, const int __incY, const float __c, const float __s );

    Parameters

    N

    The number of elements in vectors X and Y.

    X

    Vector X. Modified on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y. Modified on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    c

    The value cos(θ) in the Givens rotation matrix.

    s

    The value sin(θ) in the Givens rotation matrix.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies each element of a vector by a constant (single-precision complex).

    Declaration

    Swift

    func cblas_csscal(_ N: Int32, _ alpha: Float, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_csscal ( const int __N, const float __alpha, void *__X, const int __incX );

    Parameters

    N

    The number of elements in vector x.

    alpha

    The constant scaling factor.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Exchanges the elements of two vectors (single-precision complex).

    Declaration

    Swift

    func cblas_cswap(_ N: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32, _ Y: UnsafeMutablePointer<Void>, _ incY: Int32)

    Objective-C

    void cblas_cswap ( const int __N, void *__X, const int __incX, void *__Y, const int __incY );

    Parameters

    N

    Number of elements in vectors

    X

    Vector x. On return, contains elements copied from vector y.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y. On return, contains elements copied from vector x.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a symmetric matrix (single-precision complex).

    Declaration

    Swift

    func cblas_csymm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafePointer<Void>, _ ldb: Int32, _ beta: UnsafePointer<Void>, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_csymm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const int __ M , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , const void *__ B , const int __ ldb , const void *__ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B or B * A (depending on the value of Side) and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    where

    A = A

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Performs a rank-2k update of a symmetric matrix (single-precision complex).

    Declaration

    Swift

    func cblas_csyr2k(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafePointer<Void>, _ ldb: Int32, _ beta: UnsafePointer<Void>, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_csyr2k ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const void *__ alpha , const void *__ A , const int __ lda , const void *__ B , const int __ ldb , const void *__ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    N

    Order of matrix C.

    K

    Specifies the number of columns in matrices A and B if trans='N'.

    Specifies the number of rows if trans='C' or trans='T').

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    B

    Matrix B.

    ldb

    Leading dimension of array containing matrix B.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Computes alpha*A*B

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank-k update—multiplies a symmetric matrix by its transpose and adds a second matrix (single-precision complex).

    Declaration

    Swift

    func cblas_csyrk(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ beta: UnsafePointer<Void>, _ C: UnsafeMutablePointer<Void>, _ ldc: Int32)

    Objective-C

    void cblas_csyrk ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const void *__ alpha , const void *__ A , const int __ lda , const void *__ beta , void *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T' or 't').

    N

    Order of matrix C.

    K

    Number of columns in matrix A (or number of rows if matrix A is transposed).

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Calculates alpha*A*A; if transposed, calculates alpha*A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular band matrix, then multiplies by a vector (single-precision compex).

    Declaration

    Swift

    func cblas_ctbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const void *__ A , const int __ lda , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    A

    Matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x and stores the results in x.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular banded system of equations.

    Declaration

    Swift

    func cblas_ctbsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctbsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const void *__ A , const int __ lda , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    K

    Number of superdiagonals or subdiagonals of matrix A (depending on the value of Uplo).

    A

    Matrix A.

    lda

    The leading dimension of matrix A.

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a triangular matrix by a vector, then adds a vector (single-precision complex).

    Declaration

    Swift

    func cblas_ctpmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Void>, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctpmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const void *__ Ap , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A and the number of elements in vectors x and y.

    Ap

    Matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x, A, or conjg(A and stores the results in X.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a packed triangular system of equations.

    Declaration

    Swift

    func cblas_ctpsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Void>, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctpsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const void *__ Ap , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    Ap

    Matrix A (in packed storage format).

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular matrix and multiplies it by a matrix.

    Declaration

    Swift

    func cblas_ctrmm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafeMutablePointer<Void>, _ ldb: Int32)

    Objective-C

    void cblas_ctrmm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ M , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , void *__ B , const int __ ldb );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    M

    Number of rows in matrix B.

    N

    Number of columns in matrix B.

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of matrix A.

    B

    Matrix B. Overwritten by results on return.

    ldb

    Leading dimension of matrix B.

    Discussion

    If Side is 'L', multiplies alpha*A*B or alpha*A'*B, depending on TransA.

    If Side is 'R', multiplies alpha*B*A or alpha*B*A', depending on TransA.

    In either case, the results are stored in matrix B.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a triangular matrix by a vector.

    Declaration

    Swift

    func cblas_ctrmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctrmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const void *__ A , const int __ lda , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    A

    Matrix A.

    lda

    Leading dimension of matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Multiplies A*X or A'*X, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular system of equations with multiple values for the right side.

    Declaration

    Swift

    func cblas_ctrsm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ M: Int32, _ N: Int32, _ alpha: UnsafePointer<Void>, _ A: UnsafePointer<Void>, _ lda: Int32, _ B: UnsafeMutablePointer<Void>, _ ldb: Int32)

    Objective-C

    void cblas_ctrsm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ M , const int __ N , const void *__ alpha , const void *__ A , const int __ lda , void *__ B , const int __ ldb );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrix and vector should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    M

    The number of rows in matrix B.

    N

    The number of columns in matrix B.

    alpha

    Scaling factor for matrix A.

    A

    Triangular matrix A.

    lda

    The leading dimension of matrix B.

    B

    On entry, matrix B. Overwritten on return by matrix X.

    ldb

    The leading dimension of matrix B.

    Discussion

    If Side is 'L', solves A*X=alpha*B or A'*X=alpha*B, depending on TransA.

    If Side is 'R', solves X*A=alpha*B or X*A'=alpha*B, depending on TransA.

    In either case, the results overwrite the values of matrix B in X.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular system of equations with a single value for the right side.

    Declaration

    Swift

    func cblas_ctrsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ A: UnsafePointer<Void>, _ lda: Int32, _ X: UnsafeMutablePointer<Void>, _ incX: Int32)

    Objective-C

    void cblas_ctrsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const void *__ A , const int __ lda , void *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    The order of matrix A.

    A

    Triangular matrix A.

    lda

    The leading dimension of matrix B.

    X

    The vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves A*x=b or A'*x=b where x and b are elements in X and B.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the sum of the absolute values of real and imaginary parts of elements in a vector (single-precision complex).

    Declaration

    Swift

    func cblas_scasum(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32) -> Float

    Objective-C

    float cblas_scasum ( const int __N, const void *__X, const int __incX );

    Parameters

    N

    Number of elements in the vector.

    X

    Source vector

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    The return value is a single floating point value that contains the sum of the absolute values of both the real and imaginary parts of the vector.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the unitary norm of a vector (single-precision complex).

    Declaration

    Swift

    func cblas_scnrm2(_ N: Int32, _ X: UnsafePointer<Void>, _ incX: Int32) -> Float

    Objective-C

    float cblas_scnrm2 ( const int __N, const void *__X, const int __incX );

    Parameters

    N

    Length of vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the sum of the absolute values of elements in a vector (double-precision).

    Declaration

    Swift

    func cblas_dasum(_ N: Int32, _ X: UnsafePointer<Double>, _ incX: Int32) -> Double

    Objective-C

    double cblas_dasum ( const int __N, const double *__X, const int __incX );

    Parameters

    N

    The number of elements in vector x.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Return Value

    Returns the sum.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes a constant times a vector plus a vector (double-precision).

    Declaration

    Swift

    func cblas_daxpy(_ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_daxpy ( const int __N, const double __alpha, const double *__X, const int __incX, double *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    alpha

    Scaling factor for the values in X.

    X

    Input vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Input vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    On return, the contents of vector Y are replaced with the result. The value computed is (alpha * X[i]) + Y[i].

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Copies a vector to another vector (double-precision).

    Declaration

    Swift

    func cblas_dcopy(_ N: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dcopy ( const int __N, const double *__X, const int __incX, double *__Y, const int __incY );

    Parameters

    N

    Number of elements in the vectors.

    X

    Source vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Destination vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a general band matrix, then multiplies by a vector, then adds a vector (double precision).

    Declaration

    Swift

    func cblas_dgbmv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ KL: Int32, _ KU: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dgbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const int __ KL , const int __ KU , const double __ alpha , const double *__ A , const int __ lda , const double *__ X , const int __ incX , const double __ beta , double *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    KL

    Number of subdiagonals in matrix A.

    KU

    Number of superdiagonals in matrix A.

    alpha

    Scaling factor to multiply matrix A by.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A. (Must be at least KL+KU+1.)

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor to multiply vector Y by.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y or alpha*A'*x + beta*y depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies two matrices (double-precision).

    Declaration

    Swift

    func cblas_dgemm(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ TransB: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ K: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ B: UnsafePointer<Double>, _ ldb: Int32, _ beta: Double, _ C: UnsafeMutablePointer<Double>, _ ldc: Int32)

    Objective-C

    void cblas_dgemm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_TRANSPOSE __ TransB , const int __ M , const int __ N , const int __ K , const double __ alpha , const double *__ A , const int __ lda , const double *__ B , const int __ ldb , const double __ beta , double *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    TransB

    Specifies whether to transpose matrix B.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    K

    Number of columns in matrix A; number of rows in matrix B.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    with optional use of transposed forms of A, B, or both.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a vector (double precision).

    Declaration

    Swift

    func cblas_dgemv(_ Order: CBLAS_ORDER, _ TransA: CBLAS_TRANSPOSE, _ M: Int32, _ N: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dgemv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_TRANSPOSE __ TransA , const int __ M , const int __ N , const double __ alpha , const double *__ A , const int __ lda , const double *__ X , const int __ incX , const double __ beta , double *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    TransA

    Specifies whether to transpose matrix A.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for the product of matrix A and vector X.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector Y.

    Y

    Vector Y

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    This function multiplies A * X (after transposing A, if needed) and multiplies the resulting matrix by alpha. It then multiplies vector Y by beta. It stores the sum of these two products in vector Y.

    Thus, it calculates either

    Y←αAX + βY

    with optional use of the transposed form of A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies vector X by the transform of vector Y, then adds matrix A (double precison).

    Declaration

    Swift

    func cblas_dger(_ Order: CBLAS_ORDER, _ M: Int32, _ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafePointer<Double>, _ incY: Int32, _ A: UnsafeMutablePointer<Double>, _ lda: Int32)

    Objective-C

    void cblas_dger ( const enum CBLAS_ORDER __ Order , const int __ M , const int __ N , const double __ alpha , const double *__ X , const int __ incX , const double *__ Y , const int __ incY , double *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    M

    Number of rows in matrix A.

    N

    Number of columns in matrix A.

    alpha

    Scaling factor for vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Computes alpha*x*y' + A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Computes the L2 norm (Euclidian length) of a vector (double precision).

    Declaration

    Swift

    func cblas_dnrm2(_ N: Int32, _ X: UnsafePointer<Double>, _ incX: Int32) -> Double

    Objective-C

    double cblas_dnrm2 ( const int __N, const double *__X, const int __incX );

    Parameters

    N

    Length of vector X.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Applies a Givens rotation matrix to a pair of vectors.

    Declaration

    Swift

    func cblas_drot(_ N: Int32, _ X: UnsafeMutablePointer<Double>, _ incX: Int32, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32, _ c: Double, _ s: Double)

    Objective-C

    void cblas_drot ( const int __N, double *__X, const int __incX, double *__Y, const int __incY, const double __c, const double __s );

    Parameters

    N

    The number of elements in vectors X and Y.

    X

    Vector X. Modified on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y. Modified on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    c

    The value cos(θ) in the Givens rotation matrix.

    s

    The value sin(θ) in the Givens rotation matrix.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Constructs a Givens rotation matrix.

    Declaration

    Swift

    func cblas_drotg(_ a: UnsafeMutablePointer<Double>, _ b: UnsafeMutablePointer<Double>, _ c: UnsafeMutablePointer<Double>, _ s: UnsafeMutablePointer<Double>)

    Objective-C

    void cblas_drotg ( double *__a, double *__b, double *__c, double *__s );

    Parameters

    a

    Double-precision value a. Overwritten on return with result r.

    b

    Double-precision value b. Overwritten on return with result z (zero).

    c

    Unused on entry. Overwritten on return with the value cos(θ).

    s

    Unused on entry. Overwritten on return with the value sin(θ).

    Discussion

    Given a vertical matrix containing a and b, computes the values of cos θ and sin θ that zero the lower value (b). Returns the value of sin θ in s, the value of cos θ in c, and the upper value (r) in a.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Applies a modified Givens transformation (single precision).

    Declaration

    Swift

    func cblas_drotm(_ N: Int32, _ X: UnsafeMutablePointer<Double>, _ incX: Int32, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32, _ P: UnsafePointer<Double>)

    Objective-C

    void cblas_drotm ( const int __N, double *__X, const int __incX, double *__Y, const int __incY, const double *__P );

    Parameters

    N

    Number of elements in vectors.

    X

    Vector X. Modified on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector Y. Modified on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    P

    A 5-element vector:

    P[0]

    Flag value that defines the form of matrix H.

    -2.0: matrix H contains the identity matrix.

    -1.0: matrix H is identical to matrix SH (defined by the remaining values in the vector).

    0.0: H[1,2] and H[2,1] are obtained from matrix SH. The remaining values are both 1.0.

    1.0: H[1,1] and H[2,2] are obtained from matrix SH. H[1,2] is 1.0. H[2,1] is -1.0.

    P[1]

    Contains SH[1,1].

    P[2]

    Contains SH[2,1].

    P[3]

    Contains SH[1,2].

    P[4]

    Contains SH[2,2].

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Generates a modified Givens rotation matrix.

    Declaration

    Swift

    func cblas_drotmg(_ d1: UnsafeMutablePointer<Double>, _ d2: UnsafeMutablePointer<Double>, _ b1: UnsafeMutablePointer<Double>, _ b2: Double, _ P: UnsafeMutablePointer<Double>)

    Objective-C

    void cblas_drotmg ( double *__d1, double *__d2, double *__b1, const double __b2, double *__P );

    Parameters

    d1

    Scaling factor D1.

    d2

    Scaling factor D2.

    b1

    Scaling factor B1.

    b2

    Scaling factor B2.

    P

    A 5-element vector:

    P[0]

    Flag value that defines the form of matrix H.

    -2.0: matrix H contains the identity matrix.

    -1.0: matrix H is identical to matrix SH (defined by the remaining values in the vector).

    0.0: H[1,2] and H[2,1] are obtained from matrix SH. The remaining values are both 1.0.

    1.0: H[1,1] and H[2,2] are obtained from matrix SH. H[1,2] is 1.0. H[2,1] is -1.0.

    P[1]

    Contains SH[1,1].

    P[2]

    Contains SH[2,1].

    P[3]

    Contains SH[1,2].

    P[4]

    Contains SH[2,2].

    Discussion

    The resulting matrix zeroes the second component of the vector (sqrt(D1)*B1, sqrt(SD2)*B2).

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a symmetric band matrix, then multiplies by a vector, then adds a vector (double precision).

    Declaration

    Swift

    func cblas_dsbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ K: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dsbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const int __ K , const double __ alpha , const double *__ A , const int __ lda , const double *__ X , const int __ incX , const double __ beta , double *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    alpha

    Scaling value to multiply matrix A by.

    A

    Matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector X.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector Y is multiplied by.

    Y

    Vector Y. Replaced by results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and returns the results in vector Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies each element of a vector by a constant (double-precision).

    Declaration

    Swift

    func cblas_dscal(_ N: Int32, _ alpha: Double, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void cblas_dscal ( const int __N, const double __alpha, double *__X, const int __incX );

    Parameters

    N

    The number of elements in vector x.

    alpha

    The constant scaling factor to multiply by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a packed symmetric matrix, then multiplies by a vector, then scales and adds another vector (double precision).

    Declaration

    Swift

    func cblas_dspmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ Ap: UnsafePointer<Double>, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dspmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ Ap , const double *__ X , const int __ incX , const double __ beta , double *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A and the number of elements in vectors x and y.

    alpha

    Scaling factor that matrix A is multiplied by.

    Ap

    Matrix A (in packed storage format).

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor that vector y is multiplied by.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and stores the results in Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank one update: adds a packed symmetric matrix to the product of a scaling factor, a vector, and its transpose (double precision).

    Declaration

    Swift

    func cblas_dspr(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ Ap: UnsafeMutablePointer<Double>)

    Objective-C

    void cblas_dspr ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ X , const int __ incX , double *__ Ap );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Ap

    Matrix A (in packed storage format).

    Discussion

    Calculates A + alpha*x*x and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank two update of a packed symmetric matrix using two vectors (single precision).

    Declaration

    Swift

    func cblas_dspr2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafePointer<Double>, _ incY: Int32, _ A: UnsafeMutablePointer<Double>)

    Objective-C

    void cblas_dspr2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ X , const int __ incX , const double *__ Y , const int __ incY , double *__ A );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A (in packed storage format).

    Discussion

    Calculates A + alpha*x*y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Exchanges the elements of two vectors (double precision).

    Declaration

    Swift

    func cblas_dswap(_ N: Int32, _ X: UnsafeMutablePointer<Double>, _ incX: Int32, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dswap ( const int __N, double *__X, const int __incX, double *__Y, const int __incY );

    Parameters

    N

    Number of elements in vectors

    X

    Vector x. On return, contains elements copied from vector y.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y. On return, contains elements copied from vector x.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a matrix by a symmetric matrix (double-precision).

    Declaration

    Swift

    func cblas_dsymm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _ M: Int32, _ N: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ B: UnsafePointer<Double>, _ ldb: Int32, _ beta: Double, _ C: UnsafeMutablePointer<Double>, _ ldc: Int32)

    Objective-C

    void cblas_dsymm ( const enum CBLAS_ORDER __ Order , const enum CBLAS_SIDE __ Side , const enum CBLAS_UPLO __ Uplo , const int __ M , const int __ N , const double __ alpha , const double *__ A , const int __ lda , const double *__ B , const int __ ldb , const double __ beta , double *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Side

    Determines the order in which the matrices should be multiplied.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    M

    Number of rows in matrices A and C.

    N

    Number of columns in matrices B and C.

    alpha

    Scaling factor for the product of matrices A and B.

    A

    Matrix A.

    lda

    The size of the first dimention of matrix A; if you are passing a matrix A[m][n], the value should be m.

    B

    Matrix B.

    ldb

    The size of the first dimention of matrix B; if you are passing a matrix B[m][n], the value should be m.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    The size of the first dimention of matrix C; if you are passing a matrix C[m][n], the value should be m.

    Discussion

    This function multiplies A * B or B * A (depending on the value of Side) and multiplies the resulting matrix by alpha. It then multiplies matrix C by beta. It stores the sum of these two products in matrix C.

    Thus, it calculates either

    C←αAB + βC

    or

    C←αBA + βC

    where

    A = A

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a symmetric matrix, multiplies by a vector, then scales and adds another vector (single precision).

    Declaration

    Swift

    func cblas_dsymv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafePointer<Double>, _ incX: Int32, _ beta: Double, _ Y: UnsafeMutablePointer<Double>, _ incY: Int32)

    Objective-C

    void cblas_dsymv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ A , const int __ lda , const double *__ X , const int __ incX , const double __ beta , double *__ Y , const int __ incY );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; length of vectors.

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    beta

    Scaling factor for vector y.

    Y

    Vector y. Contains results on return.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    Discussion

    Computes alpha*A*x + beta*y and stores the results in Y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank one update: adds a symmetric matrix to the product of a scaling factor, a vector, and its transpose (double precision).

    Declaration

    Swift

    func cblas_dsyr(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ A: UnsafeMutablePointer<Double>, _ lda: Int32)

    Objective-C

    void cblas_dsyr ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ X , const int __ incX , double *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Calculates A + alpha*x*x and stores the result in A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank two update of a symmetric matrix using two vectors (single precision).

    Declaration

    Swift

    func cblas_dsyr2(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ N: Int32, _ alpha: Double, _ X: UnsafePointer<Double>, _ incX: Int32, _ Y: UnsafePointer<Double>, _ incY: Int32, _ A: UnsafeMutablePointer<Double>, _ lda: Int32)

    Objective-C

    void cblas_dsyr2 ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const int __ N , const double __ alpha , const double *__ X , const int __ incX , const double *__ Y , const int __ incY , double *__ A , const int __ lda );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    N

    Order of matrix A; number of elements in vector x.

    alpha

    Scaling factor to multiply x by.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Y

    Vector y.

    incY

    Stride within Y. For example, if incY is 7, every 7th element is used.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    Discussion

    Calculates A + alpha*x*y.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Performs a rank-2k update of a symmetric matrix (double precision).

    Declaration

    Swift

    func cblas_dsyr2k(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ B: UnsafePointer<Double>, _ ldb: Int32, _ beta: Double, _ C: UnsafeMutablePointer<Double>, _ ldc: Int32)

    Objective-C

    void cblas_dsyr2k ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const double __ alpha , const double *__ A , const int __ lda , const double *__ B , const int __ ldb , const double __ beta , double *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    N

    Order of matrix C.

    K

    Specifies the number of columns in matrices A and B if trans='N'.

    Specifies the number of rows if trans='C' or trans='T').

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    B

    Matrix B.

    ldb

    Leading dimension of array containing matrix B.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Computes alpha*A*B

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Rank-k update—multiplies a symmetric matrix by its transpose and adds a second matrix (double precision).

    Declaration

    Swift

    func cblas_dsyrk(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ Trans: CBLAS_TRANSPOSE, _ N: Int32, _ K: Int32, _ alpha: Double, _ A: UnsafePointer<Double>, _ lda: Int32, _ beta: Double, _ C: UnsafeMutablePointer<Double>, _ ldc: Int32)

    Objective-C

    void cblas_dsyrk ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ Trans , const int __ N , const int __ K , const double __ alpha , const double *__ A , const int __ lda , const double __ beta , double *__ C , const int __ ldc );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    Trans

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    N

    Order of matrix C.

    K

    Number of columns in matrix A (or number of rows if matrix A is transposed).

    alpha

    Scaling factor for matrix A.

    A

    Matrix A.

    lda

    Leading dimension of array containing matrix A.

    beta

    Scaling factor for matrix C.

    C

    Matrix C.

    ldc

    Leading dimension of array containing matrix C.

    Discussion

    Calculates alpha*A*A; if transposed, calculates alpha*A.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular band matrix, then multiplies by a vector (double precision).

    Declaration

    Swift

    func cblas_dtbmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void cblas_dtbmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const double *__ A , const int __ lda , double *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    The order of matrix A.

    K

    Half-bandwidth of matrix A.

    A

    Matrix A.

    lda

    The leading dimension of array containing matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x and stores the results in x.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a triangular banded system of equations.

    Declaration

    Swift

    func cblas_dtbsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ K: Int32, _ A: UnsafePointer<Double>, _ lda: Int32, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void cblas_dtbsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const int __ K , const double *__ A , const int __ lda , double *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    K

    Number of superdiagonals or subdiagonals of matrix A (depending on the value of Uplo).

    A

    Matrix A.

    lda

    The leading dimension of matrix A.

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Multiplies a triangular matrix by a vector, then adds a vector (double precision).

    Declaration

    Swift

    func cblas_dtpmv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Double>, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void cblas_dtpmv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const double *__ Ap , double *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n'), the transpose of A ('T' or 't'), or the conjugate of A ('C' or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A and the number of elements in vectors x and y.

    Ap

    Matrix A.

    X

    Vector x.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Computes A*x, A, or conjg(A and stores the results in X.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Solves a packed triangular system of equations.

    Declaration

    Swift

    func cblas_dtpsv(_ Order: CBLAS_ORDER, _ Uplo: CBLAS_UPLO, _ TransA: CBLAS_TRANSPOSE, _ Diag: CBLAS_DIAG, _ N: Int32, _ Ap: UnsafePointer<Double>, _ X: UnsafeMutablePointer<Double>, _ incX: Int32)

    Objective-C

    void cblas_dtpsv ( const enum CBLAS_ORDER __ Order , const enum CBLAS_UPLO __ Uplo , const enum CBLAS_TRANSPOSE __ TransA , const enum CBLAS_DIAG __ Diag , const int __ N , const double *__ Ap , double *__ X , const int __ incX );

    Parameters

    Order

    Specifies row-major (C) or column-major (Fortran) data ordering.

    Uplo

    Specifies whether to use the upper or lower triangle from the matrix. Valid values are 'U' or 'L'.

    TransA

    Specifies whether to use matrix A ('N' or 'n') or the transpose of A ('T', 't', 'C', or 'c').

    Diag

    Specifies whether the matrix is unit triangular. Possible values are 'U' (unit triangular) or 'N' (not unit triangular).

    N

    Order of matrix A.

    Ap

    Matrix A (in packed storage format).

    X

    Contains vector B on entry. Overwritten with vector X on return.

    incX

    Stride within X. For example, if incX is 7, every 7th element is used.

    Discussion

    Solves the system of equations A*X=B or A'*X=B, depending on the value of TransA.

    Import Statement

    Objective-C

    @import Accelerate;

    Swift

    import Accelerate

    Availability

    Available in iOS 4.0 and later.

  • Scales a triangular matrix and multiplies it by a matrix.

    Declaration

    Swift

    func cblas_dtrmm(_ Order: CBLAS_ORDER, _ Side: CBLAS_SIDE, _ Uplo: CBLAS_UPLO, _