TOpenCLValue Class

Header: Dew.Math/clMtxVec.h · Cross-compiler
tObjectTOpenCLBaseTOpenCLValue

class TOpenCLValue : public TOpenCLBase;

Stores a single real or complex value in GPU memory.

Copying data from and to (from CPU separate) GPU memory can cause long delays even if that data is short. Sometimes it makes sense to keep even single value variables in the GPU memory. Use this object to avoid copying individual values from GPU to CPU memory.

Constructors

NameDescription
TOpenCLValue (2)

Destructors

NameDescription
~TOpenCLValue

Properties

NameTypeDescription
CaptionDewStringStores optional label.
CDataintPtrReturns Open CL buffer reference.
CmdQueueTOpenCLCommandQueue*Returns the queue on the Device on which we will run functions using this object.
ComplexboolSet this property to indicate that object data values are to be treated complex.
ComplexValueDewString
ComplexValuesDewString
DataTVec*
DeviceTOpenCLDevice*Returns the device on which we allocated memory for this object.
FloatPrecisionTclFloatPrecision
LengthintDefines the length in number of elements (single or double precision) of the memory allocated.
RealValueDewString
RealValuesDewString
SDataintPtrReturns Open CL buffer reference.
Taglong longAllows storing optional information.

Methods

NameDescription
Abs (2)Absolute values.
Add (6)Add Src1 and Src1.
AddRef
ArcCos (2)The inverse cosine.
ArcCosh (2)Calculate the inverse hyperbolic cosine of X.
ArcCot (2)Inverse cotangens.
ArcCoth (2)Calculate the inverser hyperbolic cotangens of X.
ArcCsc (2)Calculate the inverse cosecant of X.
ArcCsch (2)Calculate the inverse hyperbolic cosecant of X.
ArcSec (2)Calculate the inverse secant of X.
ArcSech (2)Calculate the inverse hyperbolic secant of X.
ArcSin (2)The inverse sine.
ArcSinh (2)Calculate the inverse hyperbolic sine of X.
ArcTan (2)Inverse tangens.
ArcTan2 (2)Inverse tangens of Y/X.
ArcTanh (2)Calculate the inverse hyperbolic tangens of X.
CartToPolar (2)Converts value from cartesian to polar coordinate form.
Cbrt (2)The cube root.
CDataIndexReturns the index offest in to the buffer.
Ceil (2)Rounds towards positive infinity.
Conj (2)Conjugate.
Copy (5)Copy value.
CopycCopy complex value from GPU memory.
CopyFromArray (2)Copies array content.
CopyTo (2)
CopyToArray (4)
Cos (2)Cosne function.
Cosh (2)Hyperbolic cosine.
Cot (2)Cotangens.
Coth (2)Hyperbolic cotangens.
CplxToReal (2)Split complex calling object in real and imaginary part.
Csc (2)Cosecant.
Csch (2)Calculate the hyperbolic cosecant for all X object elements.
DebugUpdate
Divide (2)Divide Num with Den.
DivideBy (4)Divide Value with Vec.
Erf (2)Error function.
Erfc (2)Complementary error function.
Exp (2)Exponent (e^).
Exp10 (2)Exponent base 10 (10^X).
Exp2 (2)Exponent base 2 (2^).
Expj (2)A complex exponential e^(j*Omega)).
FinishThe calling thread will block until the command queue using this object has finished.
FixAngle (2)Sets angle in [-2PI,2PI].
Flip (2)Flips the real and imaginary part of a complex number.
FlipConj (2)Flips the real and imaginary part of the complex numbers and conjugates the result.
Floor (2)Rounds Src towards negative infinity and stores the result in the calling object.
Frac (2)Fractional part of values.
GetCData
GetCmdQueue
GetComplexValues
GetRealValues
ImagPart (2)Gets the imaginary part of a complex value.
IntPower (2)Power (integer exponent).
Inv (2)Inverse elements.
InvCbrt (2)The inverse of cube root 1/(v)^1/3.
InvSqrt (2)The inverse of square root 1/(v)^1/2.
Ln (2)Natural logarithm.
LocateCommandQueue
Log10 (2)Log base 10.
Log2 (2)Log base 2.
LogN (2)Log base N.
MagMagnitude.
Mul (7)Multiply Src1 with Src2.
MulI (2)Multiply X with 1i and store the result in to the calling object.
PolarToCart (2)Converts the polar magnitude/phase pair to cartesian pair.
Power (9)Raises base to any power.
RealPart (2)Gets real part of the complex value.
RealToCplx (2)Constructs a complex object from two real objects.
Release
Rem (3)The Reminder after division X/Y.
Reset
Round (2)Round Src.
SDataIndexReturns the index offest in to the buffer.
Sec (2)Secant.
Sech (2)Calculate the hyperbolic secant for all X object elements.
Sgn (2)Computes signum function from Src and stores the result in the calling object.
SgnMul (2)Signum.
Sin (2)Sine function.
SinCos (2)Sine and cosine.
Sinh (2)Hyperbolic sine.
SinhCosh (2)Hyperbolic sine and cosine.
Size (4)Sets the calling object to match the size of the Src object.
SizeToArray (9)Sets the size of the array to match the size of the object.
Sqr (2)Square.
Sqrt (2)Square root.
Sub (5)Subtract real Value from Src.
SubFrom (4)Substract Vec elements from Value.
Tan (2)Tangens.
Tanh (2)Hyperbolic tangens.
ThreshBottom (2)Threshold bottom operation.
ThresholdGT (4)Threshold greater than operation.
ThresholdGT_LT (2)Threshold greater than and less than operation.
ThresholdLT (4)Threshold less than operation.
ThreshTop (2)Threshold top operation.
Trunc (2)Truncate all Src object elements.
TruncAndFrac (2)Rounds a real number towards zero and returns the fractional part.
ValidateParams

Operators

NameDescription
operator* (2)Multiply Left with Right.
operator+ (2)Add Left and Right.
operator- (2)Subtract Right from Left.
operator/ (2)Divide Left with Right.

Fields

NameTypeDescription
BlockIdint
fCacheIndexint
FDataTDenseMtxVec *
FDataOffsetint
fRefCountint
IsUsedbool