Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

Next Page > Hide TOC

vDSP Matrix Operations Reference

Framework
Accelerate/vecLib
Declared in
vDSP.h

Overview

Describes the C API for the functionality for matrix operations in vecLib.

Functions by Task

Multiplying Real Matrices

Transposing a Matrix

Multiplying Complex Matrices

Functions

vDSP_mmul

Performs 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 aStride,
   float * b,
   vDSP_Stride bStride,
   float * c,
   vDSP_Stride cStride,
   vDSP_Length M,
   vDSP_Length N,
   vDSP_Length P);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_mmulD

Performs 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 aStride,
   double * b,
   vDSP_Stride bStride,
   double * c,
   vDSP_Stride cStride,
   vDSP_Length M,
   vDSP_Length N,
   vDSP_Length P);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_mtrans

Creates a transposed matrix C from a source matrix A; single precision.

   void vDSP_mtrans (float * a,
   vDSP_Stride aStride,
   float * c,
   vDSP_Stride cStride,
   vDSP_Length M,
   vDSP_Length N);

Discussion

This performs the operation


mathematical formula

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 row count for C (and the column count for A). Parameter N is the column count for C (and the row count for A).

Availability
Declared In
vDSP.h

vDSP_mtransD

Creates a transposed matrix C from a source matrix A; double precision.

   void vDSP_mtransD (double * a,
   vDSP_Stride aStride,
   double * c,
   vDSP_Stride cStride,
   vDSP_Length M,
   vDSP_Length N);

Discussion

This performs the operation


mathematical formula

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 row count for C (and the column count for A). Parameter N is the column count for C (and the row count for A).

Availability
Declared In
vDSP.h

vDSP_zmma

Performs 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);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmmaD

Performs 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);
   

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmms

Performs 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);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmmsD

Performs 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);
   

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmmul

Performs 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);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmmulD

Performs 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);
   

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmsm

Performs 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);

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

vDSP_zmsmD

Performs 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);
   

Discussion

This performs the operation


mathematical formula

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.

Availability
Declared In
vDSP.h

Next Page > Hide TOC


Last updated: 2007-06-15




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice