MtxVec VCL
|
Initialize matrix multiplication
Parameters |
Description |
A |
Matrix A. |
B |
Matrix B. |
C |
Matrix C. |
opA |
Request matrix A transpose. Request matrix B transpose. |
Alpha |
Scaling factor. |
Beta |
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.
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|