Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TOpenCLMtxVec *Rotate(TOpenCLMtxVec *Vec, int Offset, int VecIndex, int Index, int Len = MtxVecEOA) const; | A cyclic shift on vector elements in range. |
| 2 | TOpenCLVector *Rotate(TOpenCLMtxVec *Src, int Offset) const; | A cyclic shift on vector elements. |
Overload 1: TOpenCLMtxVec *Rotate(TOpenCLMtxVec *Vec, int Offset, int VecIndex, int Index, int Len = MtxVecEOA) const;
A cyclic shift on vector elements in range.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Vec | TOpenCLMtxVec * | |
| 2 | Offset | int | |
| 3 | VecIndex | int | |
| 4 | Index | int | |
| 5 | Len = MtxVecEOA | int |
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
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler
Overload 2: TOpenCLVector *Rotate(TOpenCLMtxVec *Src, int Offset) const;
A cyclic shift on vector elements.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Src | TOpenCLMtxVec * | |
| 2 | Offset | int |
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
#include "clMtxExpr.h"
using namespace Dew;
using namespace Dew::Math;
void Example()
{
clVector a, b;
a.CopyFromArray(DewArray<float>{1, 2, 3, 4});
b.Rotate(a, 2); // b = [3,4,1,2]
}
See Also: clVector::Reverse, clVector::Shift
Declared in Dew::Math::clVector · Dew.Math/clMtxExpr.h · Cross-compiler