clValue Struct

Header: Dew.Math/clMtxExpr.h · Cross-compiler

struct clValue;

Open CL single value class with overloaded operators.

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 (scalars) in the GPU memory. Use this object to avoid copying individual values from GPU to CPU memory and reuse the scalars directly.

Constructors

NameDescription
clValue (5)

Destructors

NameDescription
~clValue

Properties

NameTypeDescription
CaptionDewString
Complexbool
DataTOpenCLValue*
DeviceTOpenCLDevice*Returns the device on which we allocated memory for this object.
FloatPrecisionTclFloatPrecision
Taglong long

Methods

NameDescription
__Hold
__Retain
AbsAbsolute values of X.
Add (3)Add values in Src1 and Src2.
ArcCosThe inverse cosine.
ArcCoshCalculate the inverse hyperbolic cosine of X.
ArcCotInverse cotangens.
ArcCothCalculate the inverser hyperbolic cotangens of X.
ArcCscCalculate the inverse cosecant of X.
ArcCschCalculate the inverse hyperbolic cosecant of X.
ArcSecCalculate the inverse secant of X and stores the results in the calling object.
ArcSechCalculate the inverse hyperbolic secant of X.
ArcSinThe inverse sine.
ArcSinhCalculate the inverse hyperbolic sine of X.
ArcTanInverse tangens.
ArcTan2Inverse tangens of Y/X.
ArcTanhCalculate the inverse hyperbolic tangens of X.
CartToPolarConverts value from cartesian to polar coordinate form.
CbrtThe cube root.
CeilRounds towards positive infinity.
ConjConjugate.
Copy (4)Copy object value.
CopycCopy object value from GPU to CPU memory.
CosSine function.
CoshHyperbolic cosine.
CotCotangens.
CothHyperbolic cotangens.
CplxToRealSplit complex value in real and imaginary part.
CscCosecant.
CschCalculate the hyperbolic cosecant of X.
DivideDivide Num with Den.
DivideBy (2)Divide Value with Vec and store the result in the calling object.
ErfError function of value.
ErfcComplementary error functon of value.
ExpExponent (e^).
Exp10Exponent base 10 (10^X).
Exp2Exponent base 2 (2^X).
ExpjA complex exponential e^(j*Omega)).
FixAngleSets angle in [-2PI,2PI].
FlipFlips the real and imaginary part of complex number.
FlipConjFlips the real and imaginary part and conjugates the complex number.
FloorRounds Src object value towards negative infinity and stores the result in the calling object.
FracFractional part of values.
GetFloatPrecision
ImagPartGets the imaginary part of a complex object.
IntPowerPower (integer exponent).
InvInverse (1/x).
InvCbrtThe inverse of cube root 1/(v)^1/3.
InvSqrtThe inverse of square root 1/(v)^1/2.
LnNatural logarithm.
Log10Log base 10.
Log2Log base 2.
LogNLog base N.
MagMagnitude.
Mul (3)Multiply Src1 with Src2.
MulIMultiply X with 1i and store the result in the calling object.
PolarToCartConverts the polar magnitude/phase pair to cartesian pair.
Power (5)Raises base object elements to any power.
RealPartGets real part of complex object value.
RealToCplxConstructs a complex object from two real objects.
RemThe Reminder after division X/Y.
RoundRounds Src value.
SecSecant.
SechCalculate the hyperbolic secant of X.
SetFloatPrecision
SgnComputes signum function from Src value and stores the result in the calling object.
SgnMulSignum.
SinSine function.
SinCosSine and cosine.
SinhHyperbolic sine.
SinhCoshHyperbolic sine and cosine.
Size (2)Obtains the precision (single or double) from Src and sets Complex property to aComplex.
SqrSquare.
SqrtSquare root.
Sub (3)Subtract real Value from Src.
SubFrom (2)Substract Vec elements from Value.
TanTangens.
TanhHyperbolic tangens.
ThreshBottomThreshold bottom operation.
ThresholdGT (2)Threshold greater than operation.
ThresholdGT_LTThreshold greater than and less than operation.
ThresholdLT (2)Threshold less than operation.
ThreshTopThreshold top operation.
TruncTruncate Src object value.
TruncAndFracRounds a real number towards zero and returns the fractional part.

Operators

NameDescription
operator double
operator TCplx
operator TOpenCLValue *
operator* (7)Multiply Left with Right.
operator+ (7)Add left to aRight and return result.
operator- (8)Subtract Right from Left.
operator->
operator/ (7)Divide Left with Right.
operator=