TSmallMatrixMultiply.Init Method

Overload List

#SignatureDescription
1Boolean Init(TMtx A, TMtx B, TMtx C, TMtxOperation opA, TMtxOperation opB, TCplx Alpha, TCplx Beta)Initialize matrix multiplication
2Boolean Init(TMtx A, TMtx B, TMtx C, TMtxOperation opA, TMtxOperation opB, Double Alpha, Double Beta)Initialize matrix multiplication
3Boolean Init(Int32 ARows, Int32 ACols, Int32 BRows, Int32 BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, TCplx Alpha, TCplx Beta)Initialize matrix multiplication
4Boolean Init(Int32 ARows, Int32 ACols, Int32 BRows, Int32 BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, Double Alpha, Double Beta)Initialize matrix multiplication

Overload 1: Boolean Init(TMtx A, TMtx B, TMtx C, TMtxOperation opA, TMtxOperation opB, TCplx Alpha, TCplx Beta)

Initialize matrix multiplication

#NameDescription
1AMatrix A.
2BMatrix B.
3CMatrix C.
4opARequest matrix A transpose.
5opBRequest matrix B transpose.
6AlphaScaling factor.
7BetaScaling factor.

Returns: Boolean

Remarks:

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: Boolean Init(TMtx A, TMtx B, TMtx C, TMtxOperation opA, TMtxOperation opB, Double Alpha, Double Beta)

Initialize matrix multiplication

#NameDescription
1AMatrix A.
2BMatrix B.
3CMatrix C.
4opARequest matrix A transpose.
5opBRequest matrix B transpose.
6AlphaScaling factor.
7BetaScaling factor.

Returns: Boolean

Remarks:

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.

Overload 3: Boolean Init(Int32 ARows, Int32 ACols, Int32 BRows, Int32 BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, TCplx Alpha, TCplx Beta)

Initialize matrix multiplication

#NameDescription
1ARowsMatrix A row count.
2AColsMatrix A column count.
3BRowsMatrix B row count.
4BColsMatrix B column count.
5opARequest matrix A transpose.
6opBRequest matrix B transpose.
7AlphaScaling factor.
8BetaScaling factor.
9aFloatPrecisionThe storage precision of all three matrices, A, B and C.

Returns: Boolean

Remarks:

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: Boolean Init(Int32 ARows, Int32 ACols, Int32 BRows, Int32 BCols, TMtxFloatPrecision aFloatPrecision, TMtxOperation opA, TMtxOperation opB, Double Alpha, Double Beta)

Initialize matrix multiplication

#NameDescription
1ARowsMatrix A row count.
2AColsMatrix A column count.
3BRowsMatrix B row count.
4BColsMatrix B column count.
5opARequest matrix A transpose.
6opBRequest matrix B transpose.
7AlphaScaling factor.
8BetaScaling factor.
9aFloatPrecisionThe storage precision of all three matrices, A, B and C.

Returns: Boolean

Remarks:

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.