Overload List
| # | Signature | Description |
|---|---|---|
| 1 | TOpenCLBase *Rem(TOpenCLBase *X, TOpenCLBase *Y, int XIndex, int YIndex, int Index, int Len); | |
| 2 | TOpenCLBase *Rem(TOpenCLBase *X, const double Y, int XIndex, int Index, int Len); | |
| 3 | TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, TOpenCLMtxVec *Y); | The Reminder after division X/Y. |
| 4 | TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, TOpenCLMtxVec *Y, int XIndex, int YIndex, int Index, int Len); | Calculates reminder after division X/Y. |
| 5 | TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, const double Y); | Calculates reminder after division X/Y. |
| 6 | TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, const double Y, int XIndex, int Index, int Len); | Calculates reminder after division X/Y. |
Overload 1: TOpenCLBase *Rem(TOpenCLBase *X, TOpenCLBase *Y, int XIndex, int YIndex, int Index, int Len);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLBase * | |
| 2 | Y | TOpenCLBase * | |
| 3 | XIndex | int | |
| 4 | YIndex | int | |
| 5 | Index | int | |
| 6 | Len | int |
Overload 2: TOpenCLBase *Rem(TOpenCLBase *X, const double Y, int XIndex, int Index, int Len);
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLBase * | |
| 2 | Y | const double | |
| 3 | XIndex | int | |
| 4 | Index | int | |
| 5 | Len | int |
Overload 3: TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, TOpenCLMtxVec *Y);
The Reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec * | |
| 2 | Y | TOpenCLMtxVec * |
Calculates reminder after division according to formula:
x[i]-y[i]*Trunc(x[i]/y[i]).
The results will be saved to the calling vector. X and Y must be a real and have the same length. Size and TOpenCLBase::Complex properties of the calling vector are set implicitly to match the X object.
#include "Math387.h"
#include "clMtxVec.h"
#include "Units.clMtxVec.h"
using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;
void Example()
{
TOpenCLVector *a, *b, *c;
CreateIt(a, b, c);
a->CopyFromArray( DewArray<double>{0,1,10,-1,-10}); // a = [0, 1, 10, -1, -10];
b->CopyFromArray(DewArray<double>{0,1,PI,-1,-PI}); // b = [0, 1, PI, -1, -PI];
c->Rem(a,b); // c = [NaN, 0, 0.5752, 0, -0.5752]
FreeIt(a,b,c);
}
Overload 4: TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, TOpenCLMtxVec *Y, int XIndex, int YIndex, int Index, int Len);
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec * | |
| 2 | Y | TOpenCLMtxVec * | |
| 3 | XIndex | int | |
| 4 | YIndex | int | |
| 5 | Index | int | |
| 6 | Len | int |
Calculation uses the following formula:
z[i] = x[xi]-y[yi]*Trunc(x[xi]/y[yi]),
where i in [Index..Index+Len], xi in [XIndex..XIndex+Len], yi in [YIndex..YIndex+Len]. The results will be saved to the calling vector. X must be a real. An exception will be raised if array borders are overrun.
Overload 5: TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, const double Y);
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec * | |
| 2 | Y | const double |
Reminder is calculated by using the following formula:
x[i]-y*Trunc(x[i]/y).
X must be a real. The results will be saved to the calling vector. Size and TOpenCLBase::Complex properties of the calling vector are set implicitly to match the X object.
Overload 6: TOpenCLMtxVec *Rem(TOpenCLMtxVec *X, const double Y, int XIndex, int Index, int Len);
Calculates reminder after division X/Y.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | X | TOpenCLMtxVec * | |
| 2 | Y | const double | |
| 3 | XIndex | int | |
| 4 | Index | int | |
| 5 | Len | int |
Reminder is calculated by using the following formula:
x[i]-y*Trunc(x[i]/y).
X must be a real. The results will be saved to the calling vector. An exception will be raised if array borders are overrun.