Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function DotProd(const Vec: TOpenCLMtxVec): Double; | Scalar product of two real arrays. |
| └ indexed: function DotProd(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): Double; | ||
| 2 | procedure DotProd(DstIndex: Integer; const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; const Buffer: TOpenCLMtxVec); | Scalar product of two real arrays. |
| 3 | procedure DotProd(DstIndex: Integer; const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; ConjVec: Boolean; const Buffer: TOpenCLMtxVec); | Scalar product of two real or complex arrays. |
Overload 1: function DotProd(const Vec: TOpenCLMtxVec): Double;
Scalar product of two real arrays.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Returns: Double
Calculates the dot product (scalar value) of the calling object and Vec object and returns a real scalar value. The dot product is defined by the equation:
Both objects must be of equal size. If they are not, the method will return the dot product of the largest sub-array.
Indexed: function DotProd(const Vec: TOpenCLMtxVec; VecIndex: Integer; Index: Integer; Len: Integer): Double;
Returns the scalar product between Vec elements [VecIndex]..[VecIndex+Len-1] and calling object elements [Index]..[Index+Len-1].
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | VecIndex | Integer | |
| 3 | Index | Integer | start index |
| 4 | Len | Integer | element count |
Returns: Double
An exception is raised if Vec and calling object TOpenCLBase.Complex property is True. An exception is raised if array borders are overrun or underrun.
Overload 2: procedure DotProd(DstIndex: Integer; const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; const Buffer: TOpenCLMtxVec);
Scalar product of two real arrays.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | DstIndex | Integer | destination start index |
| 2 | Vec1 | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 3 | Vec2 | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 4 | Buffer | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object)
Calculates the dot product (scalar value) of the calling object and Vec object and returns a real scalar value. The result is stored at specified index in the calling vector in the GPU memory. This variant of the function is non-blocking (faster), because the result does not have to be copied to the CPU memory to be used.
The dot product is defined by the equation:
Both objects must be of equal size. If they are not, the method will return the dot product of the largest sub-array.
Overload 3: procedure DotProd(DstIndex: Integer; const Vec1: TOpenCLMtxVec; const Vec2: TOpenCLMtxVec; ConjVec: Boolean; const Buffer: TOpenCLMtxVec);
Scalar product of two real or complex arrays.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | DstIndex | Integer | destination start index |
| 2 | Vec1 | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 3 | Vec2 | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 4 | ConjVec | Boolean | |
| 5 | Buffer | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
Result: stored in self (calling object)
Calculates the dot product (scalar value) of the Vec1 and Vec2 stores the result in calling vector at position DstIndex. ConjVec parameter is ignored if data is real. If ConjVec is true, the function computes: result = Vec1*conj(Vec2)
The dot product is defined by the equation:
Both objects must be of equal size. If they are not, the method will return the dot product of the largest sub-array.