| Framework | Accelerate/vecLib |
| Declared in | vDSP.h |
This document describes the C API for the matrix arithmetic operations available in vDSP. It provides functionality for multiplying and transposing real or complex matrices.
The contents of a submatrix are copied to another submatrix.
void vDSP_mmov (float * A, float * C, vDSP_Length NC, vDSP_Length NR, vDSP_Length TCA, vDSP_Length TCC);
Single-precision real input submatrix
Single-precision real output submatrix
Number of columns in A and C
Number of rows in A and C
Number of columns in the matrix of which A is a submatrix
Number of columns in the matrix of which C is a submatrix
The matrices are assumed to be stored in row-major order. Thus elements A[i][j] and A[i][j+1] are adjacent. Elements A[i][j] and A[i+1][j] are TCA elements apart.
This function may be used to move a subarray beginning at any point in a larger embedding array by passing for A the address of the first element of the subarray. For example, to move a subarray starting at A[3][4], pass &A[3][4]. Similarly, the address of the first destination element is passed for C
NC may equal TCA, and it may equal TCC. To copy all of an array to all of another array, pass the number of rows in NR and the number of columns in NC, TCA, and TCC.
vDSP.hThe contents of a submatrix are copied to another submatrix.
void vDSP_mmovD (double * A, double * C, vDSP_Length NC, vDSP_Length NR, vDSP_Length TCA, vDSP_Length TCC);
Double-precision real input submatrix
Double-precision real output submatrix
Number of columns in A and C
Number of rows in A and C
Number of columns in the matrix of which A is a submatrix
Number of columns in the matrix of which C is a submatrix
The matrices are assumed to be stored in row-major order. Thus elements A[i][j] and A[i][j+1] are adjacent. Elements A[i][j] and A[i+1][j] are TCA elements apart.
This function may be used to move a subarray beginning at any point in a larger embedding array by passing for A the address of the first element of the subarray. For example, to move a subarray starting at A[3][4], pass &A[3][4]. Similarly, the address of the first destination element is passed for C
NC may equal TCA, and it may equal TCC. To copy all of an array to all of another array, pass the number of rows in NR and the number of columns in NC, TCA, and TCC.
vDSP.hPerforms an out-of-place multiplication of M-by-P matrix A by a P-by-N matrix B and stores the results in an M-by-N matrix C; single precision.
void vDSP_mmul (float * A, vDSP_Stride I, float * B, vDSP_Stride J, float * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied. I is an address stride through A. J is an address stride through B.
Parameter C is the result matrix. K is an address stride through C.
Parameter M is the row count for both A and C. Parameter N is the column count for both B and C. Parameter P is the column count for A and the row count for B.
vDSP.hPerforms an out-of-place multiplication of M-by-P matrix A by a P-by-N matrix B and stores the results in an M-by-N matrix C; double precision.
void vDSP_mmulD (double * A, vDSP_Stride I, double * B, vDSP_Stride J, double * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied. I is an address stride through A. J is an address stride through B.
Parameter C is the result matrix. K is an address stride through C.
Parameter M is the row count for both A and C. Parameter N is the column count for both B and C. Parameter P is the column count for A and the row count for B.
vDSP.hCreates a transposed matrix C from a source matrix A; single precision.
void vDSP_mtrans (float * A, vDSP_Stride I, float * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N);
This performs the operation
Parameter A is the source matrix. I is an address stride through the source matrix.
Parameter C is the resulting transposed matrix. K is an address stride through the result matrix.
Parameter M is the number of rows in C (and the number of columns in A).
vDSP.hCreates a transposed matrix C from a source matrix A; double precision.
void vDSP_mtransD (double * A, vDSP_Stride I, double * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N);
This performs the operation
Parameter A is the source matrix. I is an address stride through the source matrix.
Parameter C is the resulting transposed matrix. K is an address stride through the result matrix.
Parameter M is the number of rows in C (and the number of columns in A).
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B, adds the product to M-by-N matrix C, and stores the result in M-by-N matrix D; single precision.
void vDSP_zmma (DSPSplitComplex * A, vDSP_Stride I, DSPSplitComplex * B, vDSP_Stride J, DSPSplitComplex * C, vDSP_Stride K, DSPSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and C are the matrixes to be multiplied, and C the matrix to be added. I is an address stride through A. J is an address stride through B. K is an address stride through C. L is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B, adds the product to M-by-N matrix C, and stores the result in M-by-N matrix D; double precision.
void vDSP_zmmaD (DSPDoubleSplitComplex * A, vDSP_Stride I, DSPDoubleSplitComplex * B, vDSP_Stride J, DSPDoubleSplitComplex * C, vDSP_Stride K, DSPDoubleSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and C are the matrixes to be multiplied, and C the matrix to be added. I is an address stride through A. J is an address stride through B. K is an address stride through C. L is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B , subtracts M-by-N matrix C from the product, and stores the result in M-by-N matrix D; single precision.
void vDSP_zmms (DSPSplitComplex * A, vDSP_Stride I, DSPSplitComplex * B, vDSP_Stride J, DSPSplitComplex * C, vDSP_Stride K, DSPSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied, and C the matrix to be subtracted. I is an address stride through A. J is an address stride through B. K is an address stride through C. L is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B , subtracts M-by-N matrix C from the product, and stores the result in M-by-N matrix D; double precision.
void vDSP_zmmsD (DSPDoubleSplitComplex * A, vDSP_Stride I, DSPDoubleSplitComplex * B, vDSP_Stride J, DSPDoubleSplitComplex * C, vDSP_Stride K, DSPDoubleSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied, and C the matrix to be subtracted. I is an address stride through A. J is an address stride through B. K is an address stride through C. L is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B and stores the results in an M-by-N matrix C; single precision.
void vDSP_zmmul (DSPSplitComplex * A, vDSP_Stride I, DSPSplitComplex * B, vDSP_Stride J, DSPSplitComplex * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied. I is an address stride through A. J is an address stride through B.
Parameter C is the result matrix. K is an address stride through C.
Parameter M is the row count for both A and C. Parameter N is the column count for both B and C. Parameter P is the column count for A and the row count for B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B and stores the results in an M-by-N matrix C; double precision.
void vDSP_zmmulD (DSPDoubleSplitComplex * A, vDSP_Stride I, DSPDoubleSplitComplex * B, vDSP_Stride J, DSPDoubleSplitComplex * C, vDSP_Stride K, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied. I is an address stride through A. J is an address stride through B.
Parameter C is the result matrix. K is an address stride through C.
Parameter M is the row count for both A and C. Parameter N is the column count for both B and C. Parameter P is the column count for A and the row count for B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B, subtracts the product from M-by-P matrix C, and stores the result in M-by-P matrix D; single precision.
void vDSP_zmsm (DSPSplitComplex * A, vDSP_Stride I, DSPSplitComplex * B, vDSP_Stride J, DSPSplitComplex * C, vDSP_Stride K, DSPSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied, and C is the matrix from which the product is to be subtracted. aStride is an address stride through A. bStride is an address stride through B. cStride is an address stride through C. dStride is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hPerforms an out-of-place complex multiplication of an M-by-P matrix A by a P-by-N matrix B, subtracts the product from M-by-P matrix C, and stores the result in M-by-P matrix D; double precision.
void vDSP_zmsmD (DSPDoubleSplitComplex * A, vDSP_Stride I, DSPDoubleSplitComplex * B, vDSP_Stride J, DSPDoubleSplitComplex * C, vDSP_Stride K, DSPDoubleSplitComplex * D, vDSP_Stride L, vDSP_Length M, vDSP_Length N, vDSP_Length P);
This performs the operation

Parameters A and B are the matrixes to be multiplied, and parameter C is the matrix from which the product is to be subtracted. aStride is an address stride through A. bStride is an address stride through B. cStride is an address stride through C. dStride is an address stride through D.
Parameter D is the result matrix.
Parameter M is the row count for A, C and D. Parameter N is the column count of B, C, and D. Parameter P is the column count of A and the row count of B.
vDSP.hLast updated: 2009-01-06