clValue Record

Source: clMtxExpr.cs · Assembly: Dew.Math

public 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.

Properties

NameTypeDescription
DeviceTOpenCLDeviceReturns the device on which we allocated memory for this object.

Methods

NameDescription
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 from GPU to CPU memory.
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 complex 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.
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 Src with complex Value.
MulIMultiply X with 1i and store the result in the calling object.
PolarToCartConverts the polar magnitude/phase pair to cartesian pair.
PowerRaises 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.
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 complex Value from Src.
SubFrom (2)subtract complex Vec elements from Value.
TanTangens.
TanhHyperbolic tangens.
ThreshBottomThreshold bottom operation.
ThresholdGT (2)Perform "greater than" threshold operation vor complex number stored in Vec object.
ThresholdGT_LTThreshold greater than and less than operation.
ThresholdLT (2)Perform "less than" threshold operation for Vec object complex number.
ThreshTopThreshold top operation.
TruncTruncate Src object value.
TruncAndFracRounds a real number towards zero and returns the fractional part.

Operators

NameDescription
op_Addition (7)Add left to aRight and return result.
op_Division (7)Divide Left with Right.
op_Multiply (7)Multiply Right with Left.
op_Subtraction (7)Subtract Right from Left.
op_UnaryNegationNegates value inside AValue.