This page contains the exhaustive API of the TET1D module. Note that most operators names follow their NSIMD counterparts and have the same semantics. This page is light, you may use CTRL+F to find the operator you are looking for.
Note that all operators accept literals and scalars. For example you may
write tet1d::add(a, 1)
. This also applies when using infix operators. Note
that literals or scalars of different types can be used with expression
involving other types.
In all signature below the following pseudo types are used for simplification:
ExprNumber
to designate an existing expression template on signed, unsigned
integers of floatting point types or a scalar of signed, unsigned integers or
floatting point types.
ExprBool
to designate an existing expression template over booleans or
a boolean.
ToType
to designate a base type (signed, unsigned integers or floatting
point types) and is used when a change in type is requested for example
when converting data.
ExprNumber orb(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the bitwise or of the arguments.
ExprNumber andb(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the bitwise and of the arguments.
ExprNumber andnotb(ExprNumber a0, ExprNumber a1);
Returns the bitwise andnot of its arguments, more precisely "arg1 and (not arg2)"
ExprNumber notb(ExprNumber a0);
Infix operator:
Returns the bitwise not of the argument.
ExprNumber xorb(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the bitwise xor of the arguments.
ExprNumber shr(ExprNumber a0, int a1);
Infix operator:
Returns the right shift in zeros of the arguments.
ExprNumber shl(ExprNumber a0, int a1);
Infix operator:
Returns the left shift of the arguments.
ExprNumber shra(ExprNumber a0, int a1);
Performs a right shift operation with sign extension.
ExprBool orl(ExprBool a0, ExprBool a1);
Infix operator:
Returns the logical or of the arguments.
ExprBool andl(ExprBool a0, ExprBool a1);
Infix operator:
Returns the logical and of the arguments.
ExprBool andnotl(ExprBool a0, ExprBool a1);
Returns the logical andnot of its arguments, more precisely "arg1 and (not arg2)"
ExprBool xorl(ExprBool a0, ExprBool a1);
Returns the logical xor of the arguments.
ExprBool notl(ExprBool a0);
Infix operator:
Returns the logical not of the argument.
ExprNumber to_mask(ExprBool a0);
Returns a mask consisting of all ones for true elements and all zeros for false elements.
ExprBool to_logical(ExprNumber a0);
Returns a vector of logicals. Set true when the corresponding elements are non zero (at least one bit to 1) and false otherwise.
ExprNumber add(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the addition of the arguments.
ExprNumber sub(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the subtraction of the arguments.
ExprNumber mul(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the multiplication of the arguments.
ExprNumber div(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the division of the arguments.
ExprNumber neg(ExprNumber a0);
Infix operator:
Returns the opposite of the argument.
ExprNumber min(ExprNumber a0, ExprNumber a1);
Returns the minimum of the arguments.
ExprNumber max(ExprNumber a0, ExprNumber a1);
Returns the maximum of the arguments.
ExprNumber abs(ExprNumber a0);
Returns the absolute value of the argument.
ExprNumber fma(ExprNumber a0, ExprNumber a1, ExprNumber a2);
Multiply the first and second inputs and then adds the third input.
ExprNumber fnma(ExprNumber a0, ExprNumber a1, ExprNumber a2);
Multiply the first and second inputs, negate the intermediate result and then adds the third input.
ExprNumber fms(ExprNumber a0, ExprNumber a1, ExprNumber a2);
Substracts the third input to multiplication the first and second inputs.
ExprNumber fnms(ExprNumber a0, ExprNumber a1, ExprNumber a2);
Multiply the first and second inputs, negate the intermediate result and then substracts the third input to the intermediate result.
ExprNumber rec(ExprNumber a0);
Returns the reciprocal of the argument.
ExprNumber rec11(ExprNumber a0);
Returns the reciprocal with relative error at most \(2^{-11}\) of the argument.
ExprNumber rec8(ExprNumber a0);
Returns the reciprocal with relative error at most \(2^{-8}\) of the argument.
ExprNumber sqrt(ExprNumber a0);
Returns the square root of the argument.
ExprNumber rsqrt11(ExprNumber a0);
Returns the square root with relative error at most \(2^{-11}\) of the argument.
ExprNumber rsqrt8(ExprNumber a0);
Returns the square root with relative error at most \(2^{-8}\) of the argument.
ExprNumber adds(ExprNumber a0, ExprNumber a1);
Returns the saturated sum of the two vectors given as arguments
ExprNumber subs(ExprNumber a0, ExprNumber a1);
Returns the saturated subtraction of the two vectors given as arguments
ExprNumber cbrt_u35(ExprNumber a0);
Compute the cube root of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cbrt_u10(ExprNumber a0);
Compute the cube root of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber hypot_u05(ExprNumber a0, ExprNumber a1);
Compute the Euclidean distance of its argument with a precision of 0.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber hypot_u35(ExprNumber a0, ExprNumber a1);
Compute the Euclidean distance of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber remainder(ExprNumber a0, ExprNumber a1);
Compute the floating-point remainder of its arguments. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber fmod(ExprNumber a0, ExprNumber a1);
Compute the floating-point remainder of its argument. For more informations visit https://sleef.org/purec.xhtml.
ExprBool eq(ExprNumber a0, ExprNumber a1);
Infix operator:
Returns the compare for equality of the arguments.
ExprBool ne(ExprNumber a0, ExprNumber a1);
Infix operator:
Compare the inputs for inequality.
ExprBool gt(ExprNumber a0, ExprNumber a1);
Infix operator:
Compare the inputs for greater-than.
ExprBool ge(ExprNumber a0, ExprNumber a1);
Infix operator:
Compare the inputs for greater-or-equal-than.
ExprBool lt(ExprNumber a0, ExprNumber a1);
Infix operator:
Compare the inputs for lesser-than.
ExprBool le(ExprNumber a0, ExprNumber a1);
Infix operator:
Compare the inputs for lesser-or-equal-than.
ExprNumber ceil(ExprNumber a0);
Returns the rounding up to integer value of the argument.
ExprNumber floor(ExprNumber a0);
Returns the rounding down to integer value of the argument.
ExprNumber trunc(ExprNumber a0);
Returns the rounding towards zero to integer value of the argument.
ExprNumber round_to_even(ExprNumber a0);
Returns the rounding to nearest integer value, tie to even of the argument.
ExprNumber reinterpret(ToType, ExprNumber a0);
Reinterpret input vector into a different vector type preserving all bits.
ExprNumber cvt(ToType, ExprNumber a0);
Convert input vector into a different vector type. The output type must have same length as input type.
ExprNumber sin_u35(ExprNumber a0);
Compute the sine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cos_u35(ExprNumber a0);
Compute the cosine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber tan_u35(ExprNumber a0);
Compute the tangent of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber asin_u35(ExprNumber a0);
Compute the arcsine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber acos_u35(ExprNumber a0);
Compute the arccosine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber atan_u35(ExprNumber a0);
Compute the arctangent of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber atan2_u35(ExprNumber a0, ExprNumber a1);
Compute the arctangent of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber sin_u10(ExprNumber a0);
Compute the sine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cos_u10(ExprNumber a0);
Compute the cosine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber tan_u10(ExprNumber a0);
Compute the tangent of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber asin_u10(ExprNumber a0);
Compute the arcsine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber acos_u10(ExprNumber a0);
Compute the arccosine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber atan_u10(ExprNumber a0);
Compute the arctangent of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber atan2_u10(ExprNumber a0, ExprNumber a1);
Compute the arctangent of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber sinpi_u05(ExprNumber a0);
Compute the sine of pi times argument of its argument with a precision of 0.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cospi_u05(ExprNumber a0);
Compute the cosine of pi times argument of its argument with a precision of 0.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log_u35(ExprNumber a0);
Compute the natural logarithm of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log_u10(ExprNumber a0);
Compute the natural logarithm of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber exp_u10(ExprNumber a0);
Compute the base-e exponential of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber pow_u10(ExprNumber a0, ExprNumber a1);
Compute the power of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber exp2_u10(ExprNumber a0);
Compute the base-2 exponential of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber exp2_u35(ExprNumber a0);
Compute the base-2 exponential of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber exp10_u10(ExprNumber a0);
Compute the base-10 exponential of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber exp10_u35(ExprNumber a0);
Compute the base-10 exponential of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber expm1_u10(ExprNumber a0);
Compute the exponential minus 1 of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log10_u10(ExprNumber a0);
Compute the base-10 logarithm of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log2_u10(ExprNumber a0);
Compute the base-2 logarithm of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log2_u35(ExprNumber a0);
Compute the base-2 logarithm of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber log1p_u10(ExprNumber a0);
Compute the logarithm of 1 plus argument of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber lgamma_u10(ExprNumber a0);
Compute the log gamma of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber tgamma_u10(ExprNumber a0);
Compute the true gamma of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber erf_u10(ExprNumber a0);
Compute the complementary error of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber erfc_u15(ExprNumber a0);
Compute the complementary error of its argument with a precision of 1.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber sinh_u10(ExprNumber a0);
Compute the hyperbolic sine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cosh_u10(ExprNumber a0);
Compute the hyperbolic cosine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber tanh_u10(ExprNumber a0);
Compute the hyperbolic tangent of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber sinh_u35(ExprNumber a0);
Compute the hyperbolic sine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber cosh_u35(ExprNumber a0);
Compute the hyperbolic cosine of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber tanh_u35(ExprNumber a0);
Compute the hyperbolic tangent of its argument with a precision of 3.5 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber asinh_u10(ExprNumber a0);
Compute the inverse hyperbolic sine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber acosh_u10(ExprNumber a0);
Compute the inverse hyperbolic cosine of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.
ExprNumber atanh_u10(ExprNumber a0);
Compute the inverse hyperbolic tangent of its argument with a precision of 1.0 ulps. For more informations visit https://sleef.org/purec.xhtml.