TOpenCLMatrix.IntPower Method

Overload List

#SignatureDescription
1function IntPower(const aBase: TOpenCLMtxVec; Exponent: Integer): TOpenCLMtxVec;Calculate the power Base^(Exponent) for all Base object elements.
2function IntPower(Exponent: Integer): TOpenCLMtxVec;Power (integer exponent).

Overload 1: function IntPower(const aBase: TOpenCLMtxVec; Exponent: Integer): TOpenCLMtxVec;

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

#NameTypeDescription
1aBaseTOpenCLMtxVecsource TOpenCLVector or TOpenCLMatrix
2ExponentInteger

Result: stored in self (calling object), returns self for chaining

Remarks:

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

Overload 2: function IntPower(Exponent: Integer): TOpenCLMtxVec;

Power (integer exponent).

#NameTypeDescription
1ExponentInteger

Result: stored in self (calling object), returns self for chaining

Remarks:

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

Examples
var a: clMatrix;
begin
    a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4));
    a.IntPower(3);
end;