Overload List
Overload 1: bool Init(TMtx *A, TMtx *B, TMtx *C, TMtxOperation opA, TMtxOperation opB, const TCplx &Alpha, const TCplx &Beta);
Initialize matrix multiplication
| # | Name | Type | Description |
|---|---|---|---|
| 1 | A | TMtx * | Matrix A. |
| 2 | B | TMtx * | Matrix B. |
| 3 | C | TMtx * | Matrix C. |
| 4 | opA | TMtxOperation | Request matrix A transpose. |
| 5 | opB | TMtxOperation | Request matrix B transpose. |
| 6 | Alpha | const TCplx & | Scaling factor. |
| 7 | Beta | const TCplx & | Scaling factor. |
Initializes computation of:
C = alpha*opA(A)*opB(B) + beta*C
The procedure will initialize matrix multiplication and create in-memory code specifically designed to multiply exactly these matrices with the specified operators. (just-in-time compilation).
This design makes the performance efficient multiplication of "small" matrices possible.
To perform actual multiplication call one of the Mul methods of this object. The matrices passed must unconditionally match the parameters (size and layout) as they had when they were passed to this (Init) routine.
The parameterless Mul routine assumes also the same memory locations at which matrices A, B and C store their data and is slightly faster than the alternative Mul method. This means, that A,B and C may not be resized after calling Init.
Init can be called multiple times. Each call will overwrite the previous settings. The alpha and beta parameters are specified as complex type, but only the real part will be used when A, B and C are not complex.
Returns true if JIT will be used and false otherwise. If the JIT will not be used standard dgemm routine will be called instead. The procedure of JIT compilation is about 1000x slower, than the actual multiply operation. The kernel(s) therefore must be prepared upfront.
The Init routine is protected against initializing with same parameters again and will simply exit and reuse the existing kernel.
Overload 2: bool Init(const int ARows, const int ACols, const int BRows, const int BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, const double Alpha, const double Beta);
Initialize matrix multiplication
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | const int | Matrix A row count. |
| 2 | ACols | const int | Matrix A column count. |
| 3 | BRows | const int | Matrix B row count. |
| 4 | BCols | const int | Matrix B column count. |
| 5 | aFloatPrecision | TMtxFloatPrecision | The storage precision of all three matrices, A, B and C. |
| 6 | opA | TMtxOperation | Request matrix A transpose. |
| 7 | opB | TMtxOperation | Request matrix B transpose. |
| 8 | Alpha | const double | Scaling factor. |
| 9 | Beta | const double | Scaling factor. |
Initializes computation of:
C = alpha*opA(A)*opB(B) + beta*C
Returns true if JIT will be used and false otherwise. If the JIT will not be used standard dgemm routine will be called instead. The procedure of JIT compilation is about 1000x slower, than the actual multiply operation. The kernel(s) therefore must be prepared upfront.
The Init routine is protected against initializing with same parameters again and will simply exit and reuse the existing kernel.
Overload 3: bool Init(const int ARows, const int ACols, const int BRows, const int BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, const TCplx &Alpha, const TCplx &Beta);
Initialize matrix multiplication
| # | Name | Type | Description |
|---|---|---|---|
| 1 | ARows | const int | Matrix A row count. |
| 2 | ACols | const int | Matrix A column count. |
| 3 | BRows | const int | Matrix B row count. |
| 4 | BCols | const int | Matrix B column count. |
| 5 | aFloatPrecision | TMtxFloatPrecision | The storage precision of all three matrices, A, B and C. |
| 6 | opA | TMtxOperation | Request matrix A transpose. |
| 7 | opB | TMtxOperation | Request matrix B transpose. |
| 8 | Alpha | const TCplx & | Scaling factor. |
| 9 | Beta | const TCplx & | Scaling factor. |
Initializes computation of:
C = alpha*opA(A)*opB(B) + beta*C
Returns true if JIT will be used and false otherwise. If the JIT will not be used, the standard dgemm routine will be called instead. The procedure of JIT compilation is about 1000x slower, than the actual multiply operation. The kernel(s) therefore must be prepared upfront.
The Init routine is protected against initializing with same parameters again and will simply exit and reuse the existing kernel.
Overload 4: bool Init(TMtx *A, TMtx *B, TMtx *C, TMtxOperation opA, TMtxOperation opB, const double Alpha, const double Beta);
Initialize matrix multiplication
| # | Name | Type | Description |
|---|---|---|---|
| 1 | A | TMtx * | Matrix A. |
| 2 | B | TMtx * | Matrix B. |
| 3 | C | TMtx * | Matrix C. |
| 4 | opA | TMtxOperation | Request matrix A transpose. |
| 5 | opB | TMtxOperation | Request matrix B transpose. |
| 6 | Alpha | const double | Scaling factor. |
| 7 | Beta | const double | Scaling factor. |
Initializes computation of:
C = alpha*opA(A)*opB(B) + beta*C
The procedure will initialize matrix multiplication and create in-memory code specifically designed to multiply exactly these matrices with the specified operators. (just-in-time compilation).
This design makes the performance efficient multiplication of "small" matrices possible.
To perform actual multiplication call one of the Mul methods of this object. The matrices passed must unconditionally match the parameters (size and layout) as they had when they were passed to this (Init) routine.
The parameterless Mul routine assumes also the same memory locations at which matrices A, B and C store their data and is slightly faster than the alternative Mul method. This means, that A,B and C may not be resized after calling Init.
Init can be called multiple times. Each call will overwrite the previous settings. The alpha and beta parameters are specified as complex type, but only the real part will be used when A, B and C are not complex.
The Init routine is protected against initializing with same parameters again and will simply exit and reuse the existing kernel.
Returns true if JIT will be used and false otherwise. If the JIT will not be used standard dgemm routine will be called instead. The procedure of JIT compilation is about 1000x slower, than the actual multiply operation.