Matrix.MulSmallInit Method

Overload List

#SignatureDescription
1function MulSmallInit(const A: TMtx; const B: TMtx; opA: TMtxOperation; opB: TMtxOperation; const alpha: TCplx; const beta: TCplx): Boolean;Initializes small matrix multiply according to lapacks dgemm api standard.
2function MulSmallInit(const A: TMtx; const B: TMtx; opA: TMtxOperation; opB: TMtxOperation; const alpha: Double; const beta: Double): Boolean;Initializes small matrix multiply according to lapacks dgemm api standard.

Overload 1: function MulSmallInit(const A: TMtx; const B: TMtx; opA: TMtxOperation; opB: TMtxOperation; const alpha: TCplx; const beta: TCplx): Boolean;

Initializes small matrix multiply according to lapacks dgemm api standard.

#NameTypeDescription
1ATMtx
2BTMtx
3opATMtxOperation
4opBTMtxOperation
5alphaTCplx
6betaTCplx

Returns: Boolean

Remarks:

Initializes compute of: C = alpha*opA(A)*opB(B)+ beta*C

The routine generates code by using JIT (just in time compilation) to create a kernel, which is optimized for the specified parameters. To release existing kernel and create a new one call this routine again. The process of creating a kernel is about 1000x slower than multiplying two matrices with size 2x2. The JIT targets small matrices and will fallback to standard dgemm for large matrices.

The routine will set the size the calling matrix to match the size of the result of the multiplication.

The actual matrix multiplication is performed by calling TMtx.MulSmall method.

The function returns true, if custom code kernel was created. It returns false, if the code was routed to the default dgemm/zgemm routine, because the two matrices are too big to expect an improvement.

Overload 2: function MulSmallInit(const A: TMtx; const B: TMtx; opA: TMtxOperation; opB: TMtxOperation; const alpha: Double; const beta: Double): Boolean;

Initializes small matrix multiply according to lapacks dgemm api standard.

#NameTypeDescription
1ATMtx
2BTMtx
3opATMtxOperation
4opBTMtxOperation
5alphaDouble
6betaDouble

Returns: Boolean

Remarks:

Initializes compute of: C = alpha*opA(A)*opB(B)+ beta*C

The routine generates code by using JIT (just in time compilation) to create a kernel, which is optimized for the specified parameters. To release existing kernel and create a new one call this routine again. The process of creating a kernel is about 1000x slower than multiplying two matrices with size 2x2. The JIT targets small matrices and will fallback to standard dgemm for large matrices.

The routine will set the size the calling matrix to match the size of the result of the multiplication.

The actual matrix multiplication is performed by calling TMtx.MulSmall method.

The function returns true, if custom code kernel was created. It returns false, if the code was routed to the default dgemm/zgemm routine, because the two matrices are too big to expect an improvement.