Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TOpenCLMatrix MulElem(TOpenCLMatrix Mtx) | Matrix array multiplication. |
| 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. |
Overload 1: TOpenCLMatrix MulElem(TOpenCLMatrix Mtx)
Matrix array multiplication.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx | TOpenCLMatrix | source TOpenCLMatrix |
Returns: TOpenCLMatrix
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.
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);
}
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.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Mtx1 | TOpenCLMatrix | source TOpenCLMatrix |
| 2 | Mtx2 | TOpenCLMatrix | source TOpenCLMatrix |
Returns: TOpenCLMatrix
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.