TOpenCLVector Rotate(TOpenCLMtxVec Src, Int32 Offset)
A cyclic shift on vector elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Offset | Int32 |
Returns: TOpenCLVector
Remarks:
Performs cyclic shift on vector elements. The number of elements to shift is specified in the Offset parameter. Offset can be any integer number, positive or negative.
Examples
clVector a;
a.CopyFromArray(TSingleArray.Create(1,2,3,4));
b.Rotate(a, 2); // b = new double[] {3,4,1,2}
See Also: clVector.Reverse, clVector.Shift
Indexed: TOpenCLMtxVec Rotate(TOpenCLMtxVec Vec, Int32 Offset, Int32 VecIndex, Int32 Index, Int32 Len)
A cyclic shift on vector elements in range.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec | source TOpenCLVector or TOpenCLMatrix |
| 2 | Offset | Int32 | |
| 3 | VecIndex | Int32 | |
| 4 | Index | Int32 | start index |
| 5 | Len | Int32 | element count |
Result: stored in self (calling object), returns self for chaining
Remarks:
Performs cyclic shift on source vector elements in specified range [Index..Index+Len] and stores them to calling vector. The number of elements to shift is specified in the Offset parameter. Offset can be any integer number, positive or negative.
See Also: clVector.Reverse, clVector.Shift