clMatrix::IntPower Method

Overload List

#SignatureDescription
1TOpenCLMtxVec *IntPower(int Exponent) const;Power (integer exponent).
2TOpenCLMtxVec *IntPower(TOpenCLMtxVec *Base, int Exponent) const;Calculate the power Base^(Exponent) for all Base object elements.

Overload 1: TOpenCLMtxVec *IntPower(int Exponent) const;

Power (integer exponent).

#NameTypeDescription
1Exponentint
Remarks:

Calculate the power ^(Exponent) for all caling object elements using the integer parameter Exponent. For non integer exponents, the clMatrix::Power and clMatrix::PowerVec methods can be used.

Examples
#include "clMtxExpr.h"

using namespace Dew;
using namespace Dew::Math;

void Example()
{
    clMatrix a;

    a.CopyFromArray(2, 2, DewArray<float>{1, 2, 3, 4});
    a.IntPower(3);
}
See Also: clMatrix::Power, clMatrix::PowerVec
Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler

Overload 2: TOpenCLMtxVec *IntPower(TOpenCLMtxVec *Base, int Exponent) const;

Calculate the power Base^(Exponent) for all Base object elements.

#NameTypeDescription
1BaseTOpenCLMtxVec *
2Exponentint
Remarks:

Calclation uses the integer Exponent value and stores the results in calling object. Size and clMatrix::Complex properties of calling object are adjusted automatically.

Declared in Dew::Math::clMatrix · Dew.Math/clMtxExpr.h · Cross-compiler