ClMtxExpr.Sqr Method

Overload List

#SignatureDescription
1clMatrix Sqr(TOpenCLMatrix X)Result = X^2 from the source
2clValue Sqr(TOpenCLValue X)Result = X^2 from the source
3clVector Sqr(TOpenCLVector X)Result = X^2 from the source

Overload 1: clMatrix Sqr(TOpenCLMatrix X)

Compute X^2 from the source.

#NameTypeDescription
1XTOpenCLMatrixsource TOpenCLMatrix

Returns: clMatrix

Remarks:

Internally calls Dew.Math.clMatrix.Sqr

Overload 2: clValue Sqr(TOpenCLValue X)

Compute X^2 from the source.

#NameTypeDescription
1XTOpenCLValuesource TOpenCLValue

Returns: clValue

Remarks:

Internally calls Dew.Math.clValue.Sqr

Examples
using Dew.Math;
using Dew.Math.Units;

namespace Dew.Examples
{
    void Example()
    {
        TOpenCLValue a,b;
        clMtxVec.CreateIt(out a, out b);
        try
        {
            b.Copy(2);
            a.Sqr(b); // a=[4]
        }
        finally
        {
            clMtxVec.FreeIt(ref a, ref b);
        }
    }
}

Overload 3: clVector Sqr(TOpenCLVector X)

Compute X^2 from the source.

#NameTypeDescription
1XTOpenCLVectorsource TOpenCLVector

Returns: clVector

Remarks:

Internally calls Dew.Math.clVector.Sqr