TOpenCLMatrix.MulElem Method

Overload List

#SignatureDescription
1TOpenCLMatrix MulElem(TOpenCLMatrix Mtx)Matrix array multiplication.
2TOpenCLMatrix MulElem(TOpenCLMatrix Mtx1, TOpenCLMatrix Mtx2)Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix.

Overload 1: TOpenCLMatrix MulElem(TOpenCLMatrix Mtx)

Matrix array multiplication.

#NameTypeDescription
1MtxTOpenCLMatrixsource TOpenCLMatrix

Returns: TOpenCLMatrix

Remarks:

Multiplies elements in Mtx matrix with the elements in the calling matrix (array multiplication) and stores the results in calling matrix. The Dew.Math.TOpenCLMatrix.Rows, Dew.Math.TOpenCLMatrix.Cols and Dew.Math.TMtxVec.Complex properties of both matrices must match, otherwise an exception is raised.

Examples
TOpenCLMatrix A;
TOpenCLMatrix B;
TOpenCLMatrix C;
clMtxVec.CreateIt(A,B,C);
try
    {
        A.SetIt(2,2,false,[1,2,
        2,4));
        B.SetIt(2,2,false,[1,2,
        2,4));
        C.MulElem(A,B);
        // C becomes:
        // [1, 4,
        //  4,16]
    }
finally
    {
        clMtxVec.FreeIt(A,B,C);
    }
See Also: TOpenCLMatrix.InvElem

Overload 2: TOpenCLMatrix MulElem(TOpenCLMatrix Mtx1, TOpenCLMatrix Mtx2)

Multiplies elements in Mtx1 matrix with the elements in Mtx2 matrix (array multiplication) and stores the results in calling matrix.

#NameTypeDescription
1Mtx1TOpenCLMatrixsource TOpenCLMatrix
2Mtx2TOpenCLMatrixsource TOpenCLMatrix

Returns: TOpenCLMatrix

Remarks:

The Dew.Math.TOpenCLMatrix.Rows, Dew.Math.TOpenCLMatrix.Cols and Dew.Math.TMtxVec.Complex properties of calling matrix are set implicitly to match those of Mtx1 and Mtx2 matrices. Mtx1 and Mtx2 Rows, Cols, and Complex properties must be the same, otherwise an excetion is raised. raised.