Graph Framework
Loading...
Searching...
No Matches
graph Namespace Reference

Name space for graph nodes. More...

Classes

class  add_node
 An addition node. More...
 
class  arctan_node
 Class representing a sine_node leaf. More...
 
class  branch_node
 Class representing a branch node. More...
 
class  constant_node
 Class representing data that cannot change. More...
 
class  cosine_node
 Class representing a cosine_node leaf. More...
 
class  divide_node
 A division node. More...
 
class  erfi_node
 An imaginary error function node. More...
 
class  exp_node
 A exp node. More...
 
class  fma_node
 A fused multiply add node. More...
 
class  leaf_node
 Class representing a node leaf. More...
 
class  log_node
 A log node. More...
 
class  matrix_quantity
 Class to represent matrix quantities. More...
 
class  multiply_node
 A multiplcation node. More...
 
class  piecewise_1D_node
 Class representing a 1D piecewise constant. More...
 
class  piecewise_2D_node
 Class representing a 2D piecewise constant. More...
 
class  pow_node
 An power node. More...
 
class  pseudo_variable_node
 Class representing a subexpression that acts like a variable. More...
 
class  random_node
 Class representing a random_node leaf. More...
 
class  random_state_node
 Random state. More...
 
class  sine_node
 Class representing a sine_node leaf. More...
 
class  sqrt_node
 A sqrt node. More...
 
class  straight_node
 Class representing a straight node. More...
 
class  subtract_node
 A subtraction node. More...
 
class  triple_node
 Class representing a triple branch node. More...
 
class  variable_node
 Class representing data that can change. More...
 
class  vector_quantity
 Class to represent vector quantities. More...
 

Typedefs

template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_add = std::shared_ptr< add_node< T, SAFE_MATH > >
 Convenience type alias for shared add nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_subtract = std::shared_ptr< subtract_node< T, SAFE_MATH > >
 Convenience type alias for shared subtract nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_multiply = std::shared_ptr< multiply_node< T, SAFE_MATH > >
 Convenience type alias for shared multiply nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_divide = std::shared_ptr< divide_node< T, SAFE_MATH > >
 Convenience type alias for shared divide nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_fma = std::shared_ptr< fma_node< T, SAFE_MATH > >
 Convenience type alias for shared add nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_sqrt = std::shared_ptr< sqrt_node< T, SAFE_MATH > >
 Convenience type alias for shared sqrt nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_exp = std::shared_ptr< exp_node< T, SAFE_MATH > >
 Convenience type alias for shared exp nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_log = std::shared_ptr< log_node< T, SAFE_MATH > >
 Convenience type alias for shared log nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_pow = std::shared_ptr< pow_node< T, SAFE_MATH > >
 Convenience type alias for shared add nodes.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
using shared_erfi = std::shared_ptr< erfi_node< T, SAFE_MATH > >
 Convenience type alias for shared exp nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_leaf = std::shared_ptr< leaf_node< T, SAFE_MATH > >
 Convenience type alias for shared leaf nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using output_nodes = std::vector< shared_leaf< T, SAFE_MATH > >
 Convenience type alias for a vector of output nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_constant = std::shared_ptr< constant_node< T, SAFE_MATH > >
 Convenience type alias for shared constant nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_variable = std::shared_ptr< variable_node< T, SAFE_MATH > >
 Convenience type alias for shared variable nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using input_nodes = std::vector< shared_variable< T, SAFE_MATH > >
 Convenience type alias for a vector of inputs.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using map_nodes = std::vector< std::pair< shared_leaf< T, SAFE_MATH >, shared_variable< T, SAFE_MATH > > >
 Convenience type alias for maping end codes back to inputs.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_pseudo_variable = std::shared_ptr< pseudo_variable_node< T, SAFE_MATH > >
 Convenience type alias for shared pseudo variable nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_piecewise_1D = std::shared_ptr< piecewise_1D_node< T, SAFE_MATH > >
 Convenience type alias for shared piecewise 1D nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_piecewise_2D = std::shared_ptr< piecewise_2D_node< T, SAFE_MATH > >
 Convenience type alias for shared piecewise 2D nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_random_state = std::shared_ptr< random_state_node< T, SAFE_MATH > >
 Convenience type alias for shared sqrt nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_random = std::shared_ptr< random_node< T, SAFE_MATH > >
 Convenience type alias for shared sqrt nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_sine = std::shared_ptr< sine_node< T, SAFE_MATH > >
 Convenience type alias for shared sine nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_cosine = std::shared_ptr< cosine_node< T, SAFE_MATH > >
 Convenience type alias for shared cosine nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_atan = std::shared_ptr< arctan_node< T, SAFE_MATH > >
 Convenience type alias for shared add nodes.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_vector = std::shared_ptr< vector_quantity< T, SAFE_MATH > >
 Convenience type for shared vector quantities.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
using shared_matrix = std::shared_ptr< matrix_quantity< T, SAFE_MATH > >
 Convenience type for shared vector quantities.
 

Functions

template<jit::float_scalar T, bool SAFE_MATH = false>
bool is_constant_combineable (shared_leaf< T, SAFE_MATH > a, shared_leaf< T, SAFE_MATH > b)
 Check if nodes are constant combineable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
bool is_constant_promotable (shared_leaf< T, SAFE_MATH > a, shared_leaf< T, SAFE_MATH > b)
 Check if the constants are promotable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
bool is_variable_combineable (shared_leaf< T, SAFE_MATH > a, shared_leaf< T, SAFE_MATH > b)
 Check if the variable is combinable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
bool is_variable_promotable (shared_leaf< T, SAFE_MATH > a, shared_leaf< T, SAFE_MATH > b)
 Check if the variable is variable is promotable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
bool is_greater_exponent (shared_leaf< T, SAFE_MATH > a, shared_leaf< T, SAFE_MATH > b)
 Check if the exponent is greater than the other.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHadd (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build add node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator+ (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build add node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator+ (const L l, shared_leaf< T, SAFE_MATH > r)
 Build add node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator+ (shared_leaf< T, SAFE_MATH > l, const R r)
 Build add node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_add< T, SAFE_MATHadd_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a add node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHsubtract (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build subtract node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator- (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build subtract node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator- (const L l, shared_leaf< T, SAFE_MATH > r)
 Build subtract node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator- (shared_leaf< T, SAFE_MATH > l, const R r)
 Build subtract node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator- (shared_leaf< T, SAFE_MATH > a)
 Negate a node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_subtract< T, SAFE_MATHsubtract_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a subtract node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHmultiply (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator* (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator* (const L l, shared_leaf< T, SAFE_MATH > r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator* (shared_leaf< T, SAFE_MATH > l, const R r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_multiply< T, SAFE_MATHmultiply_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a multiply node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHdivide (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator/ (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator/ (const L l, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHoperator/ (shared_leaf< T, SAFE_MATH > l, const R r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_divide< T, SAFE_MATHdivide_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a divide node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > m, shared_leaf< T, SAFE_MATH > r)
 Build fused multiply add node.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (const L l, shared_leaf< T, SAFE_MATH > m, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar M, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (shared_leaf< T, SAFE_MATH > l, const M m, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > m, const R r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar M, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (const L l, const M m, shared_leaf< T, SAFE_MATH > r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar M, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (shared_leaf< T, SAFE_MATH > l, const M m, const R r)
 Build divide node from two leaves.
 
template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHfma (const L l, shared_leaf< T, SAFE_MATH > m, const R r)
 Build multiply node from two leaves.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_fma< T, SAFE_MATHfma_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a fma node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHsqrt (shared_leaf< T, SAFE_MATH > x)
 Define sqrt convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_sqrt< T, SAFE_MATHsqrt_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a sqrt node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHexp (shared_leaf< T, SAFE_MATH > x)
 Define exp convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_exp< T, SAFE_MATHexp_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a exp node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHlog (shared_leaf< T, SAFE_MATH > x)
 Define log convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_log< T, SAFE_MATHlog_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a exp node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpow (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build power node.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpow (const L l, shared_leaf< T, SAFE_MATH > r)
 Build power node.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpow (shared_leaf< T, SAFE_MATH > l, const R r)
 Build power node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_pow< T, SAFE_MATHpow_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a power node.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHerfi (shared_leaf< T, SAFE_MATH > x)
 Define erfi convience function.
 
template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_erfi< T, SAFE_MATHerfi_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a exp node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATHnull_leaf ()
 Create a null leaf.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > zero ()
 Forward declare for zero.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATHone ()
 Forward declare for one.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
void make_vizgraph (shared_leaf< T, SAFE_MATH > node)
 Build the vizgraph input.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHconstant (const backend::buffer< T > &d)
 Construct a constant.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHconstant (const T d)
 Construct a constant.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATHnone ()
 Create a one constant.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_constant< T, SAFE_MATHconstant_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a constant node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHvariable (const size_t s, const std::string &symbol)
 Construct a variable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHvariable (const size_t s, const T d, const std::string &symbol)
 Construct a variable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHvariable (const std::vector< T > &d, const std::string &symbol)
 Construct a variable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHvariable (const backend::buffer< T > &d, const std::string &symbol)
 Construct a variable.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_variable< T, SAFE_MATHvariable_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a variable node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpseudo_variable (shared_leaf< T, SAFE_MATH > x)
 Define pseudo variable convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_pseudo_variable< T, SAFE_MATHpseudo_variable_cast (shared_leaf< T, SAFE_MATH > &x)
 Cast to a pseudo variable node.
 
template<jit::float_scalar T>
void compile_index (std::ostringstream &stream, const std::string &register_name, const size_t length, const T scale, const T offset)
 Compile an index.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpiecewise_1D (const backend::buffer< T > &d, shared_leaf< T, SAFE_MATH > x, const T scale, const T offset)
 Define piecewise_1D convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_piecewise_1D< T, SAFE_MATHpiecewise_1D_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a piecewise 1D node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHpiecewise_2D (const backend::buffer< T > &d, const size_t n, shared_leaf< T, SAFE_MATH > x, const T x_scale, const T x_offset, shared_leaf< T, SAFE_MATH > y, const T y_scale, const T y_offset)
 Define piecewise_2D convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_piecewise_2D< T, SAFE_MATHpiecewise_2D_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a piecewise 2D node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHrandom_state (const size_t size, const uint32_t seed=0)
 Define random_state convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_random_state< T, SAFE_MATHrandom_state_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a random_state node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHrandom (shared_random_state< T, SAFE_MATH > state)
 Define random convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_random< T, SAFE_MATHrandom_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a random node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATHrandom_scale ()
 Create a random_scale constant.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHsin (shared_leaf< T, SAFE_MATH > x)
 Define sine convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_sine< T, SAFE_MATHsin_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a sine node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHcos (shared_leaf< T, SAFE_MATH > x)
 Define cosine convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_cosine< T, SAFE_MATHcos_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a cosine node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHtan (shared_leaf< T, SAFE_MATH > x)
 Define tangent convience function.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHatan (shared_leaf< T, SAFE_MATH > l, shared_leaf< T, SAFE_MATH > r)
 Build arctan node.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHatan (const L l, shared_leaf< T, SAFE_MATH > r)
 Build power node.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATHatan (shared_leaf< T, SAFE_MATH > l, const R r)
 Build power node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_atan< T, SAFE_MATHatan_cast (shared_leaf< T, SAFE_MATH > x)
 Cast to a power node.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (shared_leaf< T, SAFE_MATH > x, shared_leaf< T, SAFE_MATH > y, shared_leaf< T, SAFE_MATH > z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (const L x, shared_leaf< T, SAFE_MATH > y, shared_leaf< T, SAFE_MATH > z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar M, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (shared_leaf< T, SAFE_MATH > x, const M y, shared_leaf< T, SAFE_MATH > z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (shared_leaf< T, SAFE_MATH > x, shared_leaf< T, SAFE_MATH > y, const R z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar M, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (const L x, const M y, shared_leaf< T, SAFE_MATH > z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar M, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (shared_leaf< T, SAFE_MATH > x, const M y, const R z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (const L x, shared_leaf< T, SAFE_MATH > y, const R z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHvector (const T x, const T y, const T z)
 Build a shared vector quantity.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHoperator+ (shared_vector< T, SAFE_MATH > l, shared_vector< T, SAFE_MATH > r)
 Addition operator.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHoperator- (shared_vector< T, SAFE_MATH > l, shared_vector< T, SAFE_MATH > r)
 Subtraction operator.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHoperator* (shared_leaf< T, SAFE_MATH > s, shared_vector< T, SAFE_MATH > v)
 Multiplication operator.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATHoperator/ (shared_vector< T, SAFE_MATH > v, shared_leaf< T, SAFE_MATH > s)
 Division operator.
 
template<jit::float_scalar T, bool SAFE_MATH = false>
shared_matrix< T, SAFE_MATHmatrix (shared_vector< T, SAFE_MATH > r1, shared_vector< T, SAFE_MATH > r2, shared_vector< T, SAFE_MATH > r3)
 Build a shared vector quantity.
 

Variables

template<jit::complex_scalar T>
constexpri = T(0.0, 1.0)
 Convinece type for imaginary constant.
 

Detailed Description

Name space for graph nodes.

Function Documentation

◆ add()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::add ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build add node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ add_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_add< T, SAFE_MATH > graph::add_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a add node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ atan() [1/3]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::atan ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build power node.

Template Parameters
TBase type of the calculation.
LBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ atan() [2/3]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::atan ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build power node.

Template Parameters
TBase type of the calculation.
RBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ atan() [3/3]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::atan ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build arctan node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ atan_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_atan< T, SAFE_MATH > graph::atan_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a power node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ compile_index()

template<jit::float_scalar T>
void graph::compile_index ( std::ostringstream &  stream,
const std::string &  register_name,
const size_t  length,
const scale,
const offset 
)

Compile an index.

Template Parameters
TBase type of the calculation.
Parameters
[in,out]streamString buffer stream.
[in]register_nameReister for the argument.
[in]lengthDimension length of argument.
[in]scaleArgument scale factor.
[in]offsetArgument offset factor.

◆ constant() [1/2]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::constant ( const backend::buffer< T > &  d)

Construct a constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dArray buffer.
Returns
A reduced constant node.

◆ constant() [2/2]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::constant ( const d)

Construct a constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dScalar data to initalize.
Returns
A reduced constant node.

◆ constant_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_constant< T, SAFE_MATH > graph::constant_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a constant node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ cos()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::cos ( shared_leaf< T, SAFE_MATH x)

Define cosine convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced cos node.

◆ cos_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_cosine< T, SAFE_MATH > graph::cos_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a cosine node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ divide()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::divide ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ divide_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_divide< T, SAFE_MATH > graph::divide_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a divide node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ erfi()

template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::erfi ( shared_leaf< T, SAFE_MATH x)

Define erfi convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced exp node.

◆ erfi_cast()

template<jit::complex_scalar T, bool SAFE_MATH = false>
shared_erfi< T, SAFE_MATH > graph::erfi_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a exp node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ exp()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::exp ( shared_leaf< T, SAFE_MATH x)

Define exp convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced exp node.

◆ exp_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_exp< T, SAFE_MATH > graph::exp_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a exp node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ fma() [1/7]

template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar M, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( const L  l,
const M  m,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
MFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [2/7]

template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( const L  l,
shared_leaf< T, SAFE_MATH m,
const R  r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [3/7]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( const L  l,
shared_leaf< T, SAFE_MATH m,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [4/7]

template<jit::float_scalar T, jit::float_scalar M, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( shared_leaf< T, SAFE_MATH l,
const M  m,
const R  r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
MFloat type for the constant.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [5/7]

template<jit::float_scalar T, jit::float_scalar M, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( shared_leaf< T, SAFE_MATH l,
const M  m,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
MFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [6/7]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH m,
const R  r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma() [7/7]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::fma ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH m,
shared_leaf< T, SAFE_MATH r 
)

Build fused multiply add node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]mMiddle branch.
[in]rRight branch.

◆ fma_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_fma< T, SAFE_MATH > graph::fma_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a fma node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ is_constant_combineable()

template<jit::float_scalar T, bool SAFE_MATH = false>
bool graph::is_constant_combineable ( shared_leaf< T, SAFE_MATH a,
shared_leaf< T, SAFE_MATH b 
)

Check if nodes are constant combineable.

Template Parameters
TBase type of the nodes.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aOpperand A
[in]bOpperand B
Returns
True if a and b are combinable.

◆ is_constant_promotable()

template<jit::float_scalar T, bool SAFE_MATH = false>
bool graph::is_constant_promotable ( shared_leaf< T, SAFE_MATH a,
shared_leaf< T, SAFE_MATH b 
)

Check if the constants are promotable.

Template Parameters
TBase type of the nodes.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aOpperand A
[in]bOpperand B
Returns
True if a is promoteable over b.

◆ is_greater_exponent()

template<jit::float_scalar T, bool SAFE_MATH = false>
bool graph::is_greater_exponent ( shared_leaf< T, SAFE_MATH a,
shared_leaf< T, SAFE_MATH b 
)

Check if the exponent is greater than the other.

Template Parameters
TBase type of the nodes.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aOpperand A
[in]bOpperand B
Returns
True if a and b are combinable.

◆ is_variable_combineable()

template<jit::float_scalar T, bool SAFE_MATH = false>
bool graph::is_variable_combineable ( shared_leaf< T, SAFE_MATH a,
shared_leaf< T, SAFE_MATH b 
)

Check if the variable is combinable.

Template Parameters
TBase type of the nodes.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aOpperand A
[in]bOpperand B
Returns
True if a and b are combinable.

◆ is_variable_promotable()

template<jit::float_scalar T, bool SAFE_MATH = false>
bool graph::is_variable_promotable ( shared_leaf< T, SAFE_MATH a,
shared_leaf< T, SAFE_MATH b 
)

Check if the variable is variable is promotable.

Template Parameters
TBase type of the nodes.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aOpperand A
[in]bOpperand B
Returns
True if a and b are combinable.

◆ log()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::log ( shared_leaf< T, SAFE_MATH x)

Define log convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced log node.

◆ log_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_log< T, SAFE_MATH > graph::log_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a exp node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ make_vizgraph()

template<jit::float_scalar T, bool SAFE_MATH = false>
void graph::make_vizgraph ( shared_leaf< T, SAFE_MATH node)

Build the vizgraph input.

Parameters
[in]nodeNode to build the graph of.

◆ matrix()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_matrix< T, SAFE_MATH > graph::matrix ( shared_vector< T, SAFE_MATH r1,
shared_vector< T, SAFE_MATH r2,
shared_vector< T, SAFE_MATH r3 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]r1Row 1 matrix component.
[in]r2Row 2 matrix component.
[in]r3Row 3 matrix component.
Returns
A matrix.

◆ multiply()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::multiply ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build multiply node from two leaves.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ multiply_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_multiply< T, SAFE_MATH > graph::multiply_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a multiply node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ none()

template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > graph::none ( )
constexpr

Create a one constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Returns
A one constant.

◆ null_leaf()

template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > graph::null_leaf ( )
constexpr

Create a null leaf.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Returns
A null leaf.

◆ one()

template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > graph::one ( )
constexpr

Forward declare for one.

Create a one constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Returns
A one constant.

◆ operator*() [1/4]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator* ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator*() [2/4]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator* ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator*() [3/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator* ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator*() [4/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::operator* ( shared_leaf< T, SAFE_MATH s,
shared_vector< T, SAFE_MATH v 
)

Multiplication operator.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]sScalar term.
[in]vVector term.
Returns
The scalar vector multiply.

◆ operator+() [1/4]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator+ ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build add node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator+() [2/4]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator+ ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build add node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator+() [3/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator+ ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build add node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator+() [4/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::operator+ ( shared_vector< T, SAFE_MATH l,
shared_vector< T, SAFE_MATH r 
)

Addition operator.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft vector.
[in]rRight vector.
Returns
The vector vector addition.

◆ operator-() [1/5]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator- ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build subtract node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.
Returns
l - r

◆ operator-() [2/5]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator- ( shared_leaf< T, SAFE_MATH a)

Negate a node.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]aArgument to negate.
Returns
-1.0*a

◆ operator-() [3/5]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator- ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build subtract node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.
Returns
l - r

◆ operator-() [4/5]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator- ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build subtract node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.
Returns
l - r

◆ operator-() [5/5]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::operator- ( shared_vector< T, SAFE_MATH l,
shared_vector< T, SAFE_MATH r 
)

Subtraction operator.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft vector.
[in]rRight vector.
Returns
The vector vector addition.

◆ operator/() [1/4]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator/ ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator/() [2/4]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator/ ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build multiply node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator/() [3/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::operator/ ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build divide node from two leaves.

Note use templates here to defer this so it can be used in the above classes.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ operator/() [4/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::operator/ ( shared_vector< T, SAFE_MATH v,
shared_leaf< T, SAFE_MATH s 
)

Division operator.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]vVector numerator.
[in]sScalar denominator.
Returns
The vector scalar division.

◆ piecewise_1D()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::piecewise_1D ( const backend::buffer< T > &  d,
shared_leaf< T, SAFE_MATH x,
const scale,
const offset 
)

Define piecewise_1D convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dData to initalize the piecewise constant.
[in]xArgument.
[in]scaleArgument scale factor.
[in]offsetArgument offset factor.
Returns
A reduced piecewise_1D node.

◆ piecewise_1D_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_piecewise_1D< T, SAFE_MATH > graph::piecewise_1D_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a piecewise 1D node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ piecewise_2D()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::piecewise_2D ( const backend::buffer< T > &  d,
const size_t  n,
shared_leaf< T, SAFE_MATH x,
const x_scale,
const x_offset,
shared_leaf< T, SAFE_MATH y,
const y_scale,
const y_offset 
)

Define piecewise_2D convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dData to initalize the piecewise constant.
[in]nNumber of columns.
[in]xX argument.
[in]x_scaleScale for x argument.
[in]x_offsetOffset for x argument.
[in]yArgument.
[in]y_scaleScale for y argument.
[in]y_offsetOffset for y argument.
Returns
A reduced sqrt node.

◆ piecewise_2D_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_piecewise_2D< T, SAFE_MATH > graph::piecewise_2D_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a piecewise 2D node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ pow() [1/3]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow ( const L  l,
shared_leaf< T, SAFE_MATH r 
)

Build power node.

Template Parameters
TBase type of the calculation.
LBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ pow() [2/3]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow ( shared_leaf< T, SAFE_MATH l,
const R  r 
)

Build power node.

Template Parameters
TBase type of the calculation.
RBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ pow() [3/3]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pow ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build power node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.

◆ pow_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_pow< T, SAFE_MATH > graph::pow_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a power node.

Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ pseudo_variable()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::pseudo_variable ( shared_leaf< T, SAFE_MATH x)

Define pseudo variable convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced pseudo variable node.

◆ pseudo_variable_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_pseudo_variable< T, SAFE_MATH > graph::pseudo_variable_cast ( shared_leaf< T, SAFE_MATH > &  x)

Cast to a pseudo variable node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ random()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::random ( shared_random_state< T, SAFE_MATH state)

Define random convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]stateRandom state node.
Returns
A reduced random node.

◆ random_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_random< T, SAFE_MATH > graph::random_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a random node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ random_scale()

template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > graph::random_scale ( )
constexpr

Create a random_scale constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Returns
A random_scale constant.

◆ random_state()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::random_state ( const size_t  size,
const uint32_t  seed = 0 
)

Define random_state convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]sizeNumber of random states.
[in]seedInital random seed.
Returns
A reduced random_state node.

◆ random_state_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_random_state< T, SAFE_MATH > graph::random_state_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a random_state node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ sin()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::sin ( shared_leaf< T, SAFE_MATH x)

Define sine convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced sin node.

◆ sin_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_sine< T, SAFE_MATH > graph::sin_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a sine node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ sqrt()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::sqrt ( shared_leaf< T, SAFE_MATH x)

Define sqrt convience function.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced sqrt node.

◆ sqrt_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_sqrt< T, SAFE_MATH > graph::sqrt_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a sqrt node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ subtract()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::subtract ( shared_leaf< T, SAFE_MATH l,
shared_leaf< T, SAFE_MATH r 
)

Build subtract node from two leaves.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]lLeft branch.
[in]rRight branch.
Returns
l - r

◆ subtract_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_subtract< T, SAFE_MATH > graph::subtract_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a subtract node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ tan()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::tan ( shared_leaf< T, SAFE_MATH x)

Define tangent convience function.

tan(x) = sin(x)/cos(x)

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xArgument.
Returns
A reduced tan node.

◆ variable() [1/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::variable ( const backend::buffer< T > &  d,
const std::string &  symbol 
)

Construct a variable.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dArray buffer.
[in]symbolSymbol of the variable used in equations.

◆ variable() [2/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::variable ( const size_t  s,
const std::string &  symbol 
)

Construct a variable.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]sSize of the data buffer.
[in]symbolSymbol of the variable used in equations.

◆ variable() [3/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::variable ( const size_t  s,
const d,
const std::string &  symbol 
)

Construct a variable.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]sSize of he data buffer.
[in]dScalar data to initalize.
[in]symbolSymbol of the variable used in equations.

◆ variable() [4/4]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_leaf< T, SAFE_MATH > graph::variable ( const std::vector< T > &  d,
const std::string &  symbol 
)

Construct a variable.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]dArray buffer.
[in]symbolSymbol of the variable used in equations.

◆ variable_cast()

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_variable< T, SAFE_MATH > graph::variable_cast ( shared_leaf< T, SAFE_MATH x)

Cast to a variable node.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xLeaf node to attempt cast.
Returns
An attemped dynamic case.

◆ vector() [1/8]

template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar M, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( const L  x,
const M  y,
shared_leaf< T, SAFE_MATH z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
MFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [2/8]

template<jit::float_scalar T, jit::float_scalar L, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( const L  x,
shared_leaf< T, SAFE_MATH y,
const R  z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [3/8]

template<jit::float_scalar T, jit::float_scalar L, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( const L  x,
shared_leaf< T, SAFE_MATH y,
shared_leaf< T, SAFE_MATH z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
LFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [4/8]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( const x,
const y,
const z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [5/8]

template<jit::float_scalar T, jit::float_scalar M, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( shared_leaf< T, SAFE_MATH x,
const M  y,
const R  z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
MFloat type for the constant.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [6/8]

template<jit::float_scalar T, jit::float_scalar M, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( shared_leaf< T, SAFE_MATH x,
const M  y,
shared_leaf< T, SAFE_MATH z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
MFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [7/8]

template<jit::float_scalar T, jit::float_scalar R, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( shared_leaf< T, SAFE_MATH x,
shared_leaf< T, SAFE_MATH y,
const R  z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
RFloat type for the constant.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ vector() [8/8]

template<jit::float_scalar T, bool SAFE_MATH = false>
shared_vector< T, SAFE_MATH > graph::vector ( shared_leaf< T, SAFE_MATH x,
shared_leaf< T, SAFE_MATH y,
shared_leaf< T, SAFE_MATH z 
)

Build a shared vector quantity.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Parameters
[in]xX vector component.
[in]yY vector component.
[in]zZ Vector component.
Returns
A vector.

◆ zero()

template<jit::float_scalar T, bool SAFE_MATH = false>
constexpr shared_leaf< T, SAFE_MATH > graph::zero ( )
constexpr

Forward declare for zero.

Create a zero constant.

Template Parameters
TBase type of the calculation.
SAFE_MATHUse Safe Math operations.
Returns
A zero constant.