BLAS Reference

Framework
Accelerate/Accelerate.h
Declared in
cblas.h

Overview

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 by Task

General Functions

CATLAS and CBLAS Vector Functions

Single-Precision Float Matrix Functions

Single-Precision Complex Matrix Functions

Double-Precision Float Matrix Functions

Double-Precision Complex Matrix Functions

Functions

catlas_caxpby

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_cset

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_daxpby

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_dset

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_saxpby

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

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)
Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_sset

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_zaxpby

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

catlas_zset

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_caxpy

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

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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ccopy

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cdotc_sub

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cdotu_sub

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cgbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cgemm

Multiplies two matrices (single-precision complex).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cgemv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cgerc

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cgeru

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chemm

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

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 = AH

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chemv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cher

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cher2

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.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cher2k

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

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*BH + alpha*B*AH +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cherk

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

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*AH + beta*C; if transposed, calculates alpha*AH*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chpmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chpr

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_chpr2

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_crotg

Constructs a complex Givens rotation.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cscal

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_csrot

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_csscal

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_cswap

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_csymm

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

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 = AT

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_csyr2k

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

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*BT + alpha*B*AT +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_csyrk

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

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*AT + beta*C; if transposed, calculates alpha*AT*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctbsv

Solves a triangular banded system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctpmv

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

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, AT*x, or conjg(AT)*x and stores the results in X.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctpsv

Solves a packed triangular system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctrmm

Scales a triangular matrix and multiplies it by a matrix.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctrmv

Multiplies a triangular matrix by a vector.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctrsm

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ctrsv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dasum

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_daxpy

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

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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dcopy

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ddot

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dgbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dgemm

Multiplies two matrices (double-precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dgemv

Multiplies a matrix by a vector (double precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dger

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dnrm2

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_drot

Applies a Givens rotation matrix to a pair of vectors.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_drotg

Constructs a Givens rotation matrix.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_drotm

Applies a modified Givens transformation (single precision).

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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_drotmg

Generates a modified Givens rotation matrix.

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)T.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dscal

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsdot

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dspmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dspr

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

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*xT and stores the result in A.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dspr2

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

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*yT + alpha*y*xT.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dswap

Exchanges the elements of two vectors (double precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsymm

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

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 = AT

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsymv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsyr

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

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*xT and stores the result in A.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsyr2

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

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*yT + alpha*y*xT.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsyr2k

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

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*BT + alpha*B*AT +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dsyrk

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

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*AT + beta*C; if transposed, calculates alpha*AT*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtbsv

Solves a triangular banded system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtpmv

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

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, AT*x, or conjg(AT)*x and stores the results in X.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtpsv

Solves a packed triangular system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtrmm

Scales a triangular matrix and multiplies it by a matrix.

void cblas_dtrmm (
   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 double alpha,
   const double *A,
   const int lda,
   double *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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtrmv

Multiplies a triangular matrix by a vector.

void cblas_dtrmv (
   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 *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.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtrsm

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

void cblas_dtrsm (
   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 double alpha,
   const double *A,
   const int lda,
   double *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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dtrsv

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

void cblas_dtrsv (
   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 *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.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dzasum

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

double cblas_dzasum (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_dznrm2

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

double cblas_dznrm2 (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_errprn

Prints an error message.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_icamax

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_idamax

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_isamax

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_izamax

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sasum

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_saxpy

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

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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_scasum

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_scnrm2

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_scopy

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sdot

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sdsdot

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sgbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sgemm

Multiplies two matrices (single-precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sgemv

Multiplies a matrix by a vector (single precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sger

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_snrm2

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_srot

Applies a Givens rotation matrix to a pair of vectors.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_srotg

Constructs a Givens rotation matrix.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_srotm

Applies a modified Givens transformation (single precision).

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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_srotmg

Generates a modified Givens rotation matrix.

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)T.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sscal

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sspmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sspr

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

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*xT and stores the result in A.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sspr2

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

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*yT + alpha*y*xT.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_sswap

Exchanges the elements of two vectors (single precision).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssymm

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

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 = AT

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssymv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssyr

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

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*xT and stores the result in A.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssyr2

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

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*yT + alpha*y*xT.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssyr2k

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

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*BT + alpha*B*AT +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ssyrk

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

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*AT + beta*C; if transposed, calculates alpha*AT*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_stbmv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_stbsv

Solves a triangular banded system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_stpmv

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

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, AT*x, or conjg(AT)*x and stores the results in X.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_stpsv

Solves a packed triangular system of equations.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_strmm

Scales a triangular matrix and multiplies it by a matrix.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_strmv

Multiplies a triangular matrix by a vector.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_strsm

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_strsv

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_xerbla

The default error handler for BLAS routines.

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zaxpy

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

void cblas_zaxpy (
   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].

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zcopy

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

void cblas_zcopy (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zdotc_sub

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zdotu_sub

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

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zdrot

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

void cblas_zdrot (
   const int N,
   void *X,
   const int incX,
   void *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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zdscal

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

void cblas_zdscal (
   const int N,
   const double 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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zgbmv

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

void cblas_zgbmv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zgemm

Multiplies two matrices (double-precision complex).

void cblas_zgemm (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zgemv

Multiplies a matrix by a vector (double-precision complex).

void cblas_zgemv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zgerc

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

void cblas_zgerc (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zgeru

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

void cblas_zgeru (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhbmv

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

void cblas_zhbmv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhemm

Multiplies two Hermitian matrices (double-precision complex).

void cblas_zhemm (
   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 = AH

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhemv

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

void cblas_zhemv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zher

Adds the product of a scaling factor, vector X, and the conjugate transpose of X to matrix A.

void cblas_zher (
   const enum CBLAS_ORDER Order,
   const enum CBLAS_UPLO Uplo,
   const int N,
   const double 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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zher2

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.

void cblas_zher2 (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zher2k

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

void cblas_zher2k (
   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 double 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*BH + alpha*B*AH +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zherk

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

void cblas_zherk (
   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 void *A,
   const int lda,
   const double 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*AH + beta*C; if transposed, calculates alpha*AH*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhpmv

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

void cblas_zhpmv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhpr

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

void cblas_zhpr (
   const enum CBLAS_ORDER Order,
   const enum CBLAS_UPLO Uplo,
   const int N,
   const double 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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zhpr2

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

void cblas_zhpr2 (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zrotg

Constructs a complex Givens rotation.

void cblas_zrotg (
   void *a,
   void *b,
   void *c,
   void *s
);
Parameters
a

Complex value a. Overwritten on return with result r.

b

Complex value a. Overwritten on return with result z (zero).

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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zscal

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

void cblas_zscal (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zswap

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

void cblas_zswap (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zsymm

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

void cblas_zsymm (
   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 = AT

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zsyr2k

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

void cblas_zsyr2k (
   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*BT + alpha*B*AT +beta*C

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_zsyrk

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

void cblas_zsyrk (
   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*AT + beta*C; if transposed, calculates alpha*AT*A + beta*C.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztbmv

Scales a triangular band matrix, then multiplies by a vector (double-precision complex).

void cblas_ztbmv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztbsv

Solves a triangular banded system of equations.

void cblas_ztbsv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztpmv

Multiplies a triangular matrix by a vector, then adds a vector (double-precision compex).

void cblas_ztpmv (
   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, AT*x, or conjg(AT)*x and stores the results in X.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztpsv

Solves a packed triangular system of equations.

void cblas_ztpsv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztrmm

Scales a triangular matrix and multiplies it by a matrix.

void cblas_ztrmm (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztrmv

Multiplies a triangular matrix by a vector.

void cblas_ztrmv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztrsm

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

void cblas_ztrsm (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

cblas_ztrsv

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

void cblas_ztrsv (
   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.

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

SetBLASParamErrorProc

Sets an error handler function.

void SetBLASParamErrorProc (
   BLASParamErrorProc ErrorProc
);
Parameters
ErrorProc

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

Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

Data Types

BLASParamErrorProc

BLAS error handler callback type.

typedef void (*BLASParamErrorProc)(
   const char *funcName,
   const char *paramName,
   const int *paramPos,
   const int *paramValue);
Availability
  • Available in iOS 4.0 and later.
Declared In
cblas.h

Constants

CBLAS_ORDER

Indicates whether a matrix is in row-major or column-major order.

enum CBLAS_ORDER {
   CblasRowMajor=101,
   CblasColMajor=102
};
typedef enum CBLAS_ORDER CBLAS_ORDER;
Constants
CblasRowMajor

Row-major order.

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasColMajor

Column-major order.

Available in iOS 4.0 and later.

Declared in cblas.h.

CBLAS_TRANSPOSE

Indicates transpose operation to perform on a matrix.

enum CBLAS_TRANSPOSE {
   CblasNoTrans=111,
   CblasTrans=112,
   CblasConjTrans=113,
   AtlasConj=114
};
typedef enum CBLAS_TRANSPOSE CBLAS_TRANSPOSE;
Constants
CblasNoTrans

No transposition.

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasTrans

For matrix X, use X(T).

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasConjTrans

For matrix X, use X(H) (conjugate or Hermitian transposition).

Available in iOS 4.0 and later.

Declared in cblas.h.

AtlasConj

Available in iOS 4.0 and later.

Declared in cblas.h.

CBLAS_UPLO

Indicates which part of a symmetric matrix to use.

enum CBLAS_UPLO {
   CblasUpper=121,
   CblasLower=122
};
typedef enum CBLAS_UPLO CBLAS_UPLO;
Constants
CblasUpper

Use the upper triangle of the matrix.

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasLower

Use the lower triangle of the matrix.

Available in iOS 4.0 and later.

Declared in cblas.h.

CBLAS_DIAG

Indicates whether a triangular matrix is unit-diagonal (diagonal elements are all equal to 1).

enum CBLAS_DIAG {
   CblasNonUnit=131,
   CblasUnit=132
};
typedef enum CBLAS_DIAG CBLAS_DIAG;
Constants
CblasNonUnit

The triangular matrix is not unit-diagonal.

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasUnit

The triangular matrix is unit-diagonal.

Available in iOS 4.0 and later.

Declared in cblas.h.

CBLAS_SIDE

Indicates the order of a matrix multiplication.

enum CBLAS_SIDE {
   CblasLeft=141,
   CblasRight=142
};
typedef enum CBLAS_SIDE CBLAS_SIDE;
Constants
CblasLeft

Multiply A*B.

Available in iOS 4.0 and later.

Declared in cblas.h.

CblasRight

Multiply B*A.

Available in iOS 4.0 and later.

Declared in cblas.h.