Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Power(const Exponent: TCplx): TOpenCLMtxVec; | Raises all calling vector elements to complex power Exponent in-place. |
| 2 | function Power(const Base: TCplx; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec; | Raises Base complex value to Exponent object values powers. |
| 3 | function Power(const Base: TOpenCLMtxVec; const Exponent: TCplx): TOpenCLMtxVec; | Raises each of the Base object elements to complex Exponent power. |
| 4 | function Power(const Base: TOpenCLMtxVec; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec; | Raises each of Base object elements to corresponding power, stored in Exponenet elements. |
| 5 | function Power(const Base: TOpenCLMtxVec; const Exponent: Double): TOpenCLMtxVec; | Raises each of the Base object elements to real Exponent power. |
| 6 | function Power(const Exponent: Double): TOpenCLMtxVec; | Raises base object elements to any power. |
| 7 | function Power(const Base: Double; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec; | Raises base elements to exponent power. |
Overload 1: function Power(const Exponent: TCplx): TOpenCLMtxVec;
Raises all calling vector elements to complex power Exponent in-place.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Exponent | TCplx | scalar |
Result: stored in self (calling object), returns self for chaining
If the calling vector is real and has negative elements, the result will be NAN at those entries. To obtain a valid result in this case, extend the calling vector to complex with TOpenCLMtxVec.ExtendToComplex method. In all real/complex combinations, the Power method will not automatically assume that a number is complex to speed up the computation.
Alternatively the user can of course always convert the real numbers to complex before passing them to the Power routine.
Overload 2: function Power(const Base: TCplx; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec;
Raises Base complex value to Exponent object values powers.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TCplx | scalar |
| 2 | Exponent | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Store the results to calling object values. Size and TOpenCLBase.Complex properties of calling object are adjusted automatically.
Overload 3: function Power(const Base: TOpenCLMtxVec; const Exponent: TCplx): TOpenCLMtxVec;
Raises each of the Base object elements to complex Exponent power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Exponent | TCplx | scalar |
Result: stored in self (calling object), returns self for chaining
Size and TOpenCLBase.Complex properties of calling object are adjusted automatically.
Overload 4: function Power(const Base: TOpenCLMtxVec; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec;
Raises each of Base object elements to corresponding power, stored in Exponenet elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Exponent | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Power[i] = Base[i]^Exponent[i]
Size and TOpenCLBase.Complex property of calling object are adjusted automatically. An exception is raised if Base and Exponent sizes do not match.
Overload 5: function Power(const Base: TOpenCLMtxVec; const Exponent: Double): TOpenCLMtxVec;
Raises each of the Base object elements to real Exponent power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Exponent | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Size and TOpenCLBase.Complex properties of calling object are adjusted automatically.
Overload 6: function Power(const Exponent: Double): TOpenCLMtxVec;
Raises base object elements to any power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Exponent | Double | scalar |
Result: stored in self (calling object), returns self for chaining
Raises Base calling object elements to any power. The TOpenCLMtxVec.IntPower is faster, if Exponent is an integer. Real valued power can handle only positive Exponent. TOpenCLMtxVec.IntPower can handle negative exponent also. To compute a power to the negative exponent in general case or when the base is negative, use the complex version of the function.
var a: clMatrix;
begin
a.CopyFromArray(2,2,TSingleArray.Create(1,2,3,4));
a.Power(1.2);
end;
Overload 7: function Power(const Base: Double; const Exponent: TOpenCLMtxVec): TOpenCLMtxVec;
Raises base elements to exponent power.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Base | Double | scalar |
| 2 | Exponent | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object), returns self for chaining
Raises Base value to Exponent object values powers and store the results to calling object values. Size and TOpenCLBase.Complex properties of calling object are adjusted automatically.