Skip to content

0.8.4

Compare
Choose a tag to compare
@ddemidov ddemidov released this 20 Sep 12:13
· 787 commits to master since this release
  • Allow user-defined functions in symbolic expressions
  • Introduced address-of and dereference operators in vector expressions
    This makes the following possible:
/*
 * Assign 42 to either y or z, depending on value of x. The trick with
 * address_of/dereference is unfortunately required because in C99 (which
 * OpenCL is based on) result of ternary operator is not an lvalue.
 */
vex::tie( *if_else( x < 0.5 ? &y : &z) ) = 42;
  • vex::reduce() accepts slices of vector expressions. vex::reduce() calls may
    be nested.
  • vex::element_index() optionally accepts length (number of elements). This
    allows to reduce stateless vector expressions. Could be useful e.g. for
    Monte-Carlo experiments.
  • Added missing builtin functions.
  • Introduced constants in vector expressions. Instances of
    std::integral_constant<T,v> or constants from vex::constants namespace (which
    are currently wrappers for boost::math::constants) will not be passed as kernel
    parameters, but will be written as literals to kernel source. Users may introduce their own constants with help of VEX_CONSTANT macro.