TOpenCLVector::SetVal Method

Overload List

#SignatureDescription
1TOpenCLMtxVec *SetVal(const double Value);Initialize elements to Value.
2TOpenCLMtxVec *SetVal(const double Value, int Index, int Len);Set all calling object elements [Index]..[Index+Len-1] to real Value.
3TOpenCLMtxVec *SetVal(const TCplx &Value);Set all calling object complex elements to complex Value.
4TOpenCLMtxVec *SetVal(const TCplx &Value, int Index, int Len);Set calling object complex elements [Index]..[Index+Len-1] to complex Value.

Overload 1: TOpenCLMtxVec *SetVal(const double Value);

Initialize elements to Value.

#NameTypeDescription
1Valueconst double
Remarks:

Set all calling object elements to Value. If the calling object is complex then the real part is set to Value and the imaginary is set to zero.

Examples
#include "Units.clMtxVec.h"
#include "clMtxVec.h"

using namespace Dew;
using namespace Dew::Math;
using namespace Dew::Math::Units::ClMtxVec;

void Example()
{
    TOpenCLVector* a;
    CreateIt(a);
    a->Size(false, TclFloatPrecision::clFloat, 4);
    a->SetVal(1);
    FreeIt(a);
}
See Also: TOpenCLVector::SetZero
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 2: TOpenCLMtxVec *SetVal(const double Value, int Index, int Len);

Set all calling object elements [Index]..[Index+Len-1] to real Value.

#NameTypeDescription
1Valueconst double
2Indexint
3Lenint
Remarks:

If the calling object is complex then the real part is set to Value and the imaginary is set to zero. An exception is raised if array borders are overrun/underrun.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 3: TOpenCLMtxVec *SetVal(const TCplx &Value);

Set all calling object complex elements to complex Value.

#NameTypeDescription
1Valueconst TCplx &
Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler

Overload 4: TOpenCLMtxVec *SetVal(const TCplx &Value, int Index, int Len);

Set calling object complex elements [Index]..[Index+Len-1] to complex Value.

#NameTypeDescription
1Valueconst TCplx &
2Indexint
3Lenint
Remarks:

TOpenCLBase::Complex property of the calling object are set to true even before the call it was false. An exception is raised if calling object array borders are overrun/underrun.

Declared in Dew::Math::TOpenCLMtxVec · Dew.Math/clMtxVec.h · Cross-compiler