C++ Mathematical Expression Toolkit (ExprTk) release
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Attributes | List of all members
exprtk::details::assignment_vec_op_node< T, Operation > Class Template Reference
Inheritance diagram for exprtk::details::assignment_vec_op_node< T, Operation >:
[legend]
Collaboration diagram for exprtk::details::assignment_vec_op_node< T, Operation >:
[legend]

Public Types

typedef expression_node< T > * expression_ptr
 
typedef vector_node< T > * vector_node_ptr
 
typedef vec_data_store< Tvds_t
 
- Public Types inherited from exprtk::details::binary_node< T >
typedef expression_node< T > * expression_ptr
 
typedef std::pair< expression_ptr, boolbranch_t
 
- Public Types inherited from exprtk::details::expression_node< T >
enum  node_type {
  e_none , e_null , e_constant , e_unary ,
  e_binary , e_binary_ext , e_trinary , e_quaternary ,
  e_vararg , e_conditional , e_while , e_repeat ,
  e_for , e_switch , e_mswitch , e_return ,
  e_retenv , e_variable , e_stringvar , e_stringconst ,
  e_stringvarrng , e_cstringvarrng , e_strgenrange , e_strconcat ,
  e_stringvarsize , e_strswap , e_stringsize , e_stringvararg ,
  e_function , e_vafunction , e_genfunction , e_strfunction ,
  e_strcondition , e_strccondition , e_add , e_sub ,
  e_mul , e_div , e_mod , e_pow ,
  e_lt , e_lte , e_gt , e_gte ,
  e_eq , e_ne , e_and , e_nand ,
  e_or , e_nor , e_xor , e_xnor ,
  e_in , e_like , e_ilike , e_inranges ,
  e_ipow , e_ipowinv , e_abs , e_acos ,
  e_acosh , e_asin , e_asinh , e_atan ,
  e_atanh , e_ceil , e_cos , e_cosh ,
  e_exp , e_expm1 , e_floor , e_log ,
  e_log10 , e_log2 , e_log1p , e_neg ,
  e_pos , e_round , e_sin , e_sinc ,
  e_sinh , e_sqrt , e_tan , e_tanh ,
  e_cot , e_sec , e_csc , e_r2d ,
  e_d2r , e_d2g , e_g2d , e_notl ,
  e_sgn , e_erf , e_erfc , e_ncdf ,
  e_frac , e_trunc , e_uvouv , e_vov ,
  e_cov , e_voc , e_vob , e_bov ,
  e_cob , e_boc , e_vovov , e_vovoc ,
  e_vocov , e_covov , e_covoc , e_vovovov ,
  e_vovovoc , e_vovocov , e_vocovov , e_covovov ,
  e_covocov , e_vocovoc , e_covovoc , e_vococov ,
  e_sf3ext , e_sf4ext , e_nulleq , e_strass ,
  e_vector , e_vecsize , e_vecelem , e_veccelem ,
  e_vecelemrtc , e_veccelemrtc , e_rbvecelem , e_rbvecelemrtc ,
  e_rbveccelem , e_rbveccelemrtc , e_vecinit , e_vecvalass ,
  e_vecvecass , e_vecopvalass , e_vecopvecass , e_vecfunc ,
  e_vecvecswap , e_vecvecineq , e_vecvalineq , e_valvecineq ,
  e_vecvecarith , e_vecvalarith , e_valvecarith , e_vecunaryop ,
  e_vecondition , e_break , e_continue , e_swap ,
  e_assert
}
 
typedef T value_type
 
typedef expression_node< T > * expression_ptr
 
typedef node_collector_interface< expression_node< T > > nci_t
 
typedef nci_t::noderef_list_t noderef_list_t
 
typedef node_depth_base< expression_node< T > > ndb_t
 
- Public Types inherited from exprtk::details::node_collector_interface< expression_node< T > >
typedef expression_node< T > * node_ptr_t
 
typedef expression_node< T > ** node_pp_t
 
typedef std::vector< node_pp_tnoderef_list_t
 
- Public Types inherited from exprtk::details::node_depth_base< expression_node< T > >
typedef expression_node< T > * node_ptr_t
 
typedef std::pair< node_ptr_t, bool > nb_pair_t
 
- Public Types inherited from exprtk::details::vector_interface< T >
typedef vector_node< T > * vector_node_ptr
 
typedef vec_data_store< Tvds_t
 

Public Member Functions

 assignment_vec_op_node (const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
 
T value () const
 
vector_node_ptr vec () const
 
vector_node_ptr vec ()
 
expression_node< T >::node_type type () const
 
bool valid () const
 
std::size_t size () const
 
std::size_t base_size () const
 
vds_tvds ()
 
const vds_tvds () const
 
bool side_effect () const
 
- Public Member Functions inherited from exprtk::details::binary_node< T >
 binary_node (const operator_type &opr, expression_ptr branch0, expression_ptr branch1)
 
T value () const
 
expression_node< T >::node_type type () const
 
operator_type operation ()
 
expression_node< T > * branch (const std::size_t &index=0) const
 
bool valid () const
 
void collect_nodes (typename expression_node< T >::noderef_list_t &node_delete_list)
 
std::size_t node_depth () const
 
- Public Member Functions inherited from exprtk::details::expression_node< T >
virtual ~expression_node ()
 
- Public Member Functions inherited from exprtk::details::node_collector_interface< expression_node< T > >
virtual ~node_collector_interface ()
 
virtual void collect_nodes (noderef_list_t &)
 
- Public Member Functions inherited from exprtk::details::node_depth_base< expression_node< T > >
 node_depth_base ()
 
virtual ~node_depth_base ()
 
std::size_t compute_node_depth (const expression_node< T > *const &node) const
 
std::size_t compute_node_depth (const nb_pair_t &branch) const
 
std::size_t compute_node_depth (const nb_pair_t(&branch)[N]) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
std::size_t compute_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
std::size_t compute_node_depth (const Sequence< node_ptr_t, Allocator > &branch_list) const
 
std::size_t compute_node_depth (const Sequence< nb_pair_t, Allocator > &branch_list) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2) const
 
std::size_t max_node_depth (const BranchType &n0, const BranchType &n1, const BranchType &n2, const BranchType &n3) const
 
void collect (node_ptr_t const &node, const bool deletable, NodeSequence &delete_node_list) const
 
void collect (const nb_pair_t &branch, NodeSequence &delete_node_list) const
 
void collect (expression_node< T > *&node, NodeSequence &delete_node_list) const
 
void collect (const nb_pair_t(&branch)[N], NodeSequence &delete_node_list) const
 
void collect (const Sequence< nb_pair_t, Allocator > &branch, NodeSequence &delete_node_list) const
 
void collect (const Sequence< node_ptr_t, Allocator > &branch_list, NodeSequence &delete_node_list) const
 
void collect (const Sequence< node_ptr_t, AllocatorT > &branch_list, const Sequence< Boolean, AllocatorB > &branch_deletable_list, NodeSequence &delete_node_list) const
 
- Public Member Functions inherited from exprtk::details::vector_interface< T >
virtual ~vector_interface ()
 

Private Attributes

vector_node< T > * vec_node_ptr_
 
vds_t vds_
 

Additional Inherited Members

- Public Attributes inherited from exprtk::details::node_depth_base< expression_node< T > >
bool depth_set
 
std::size_t depth
 

Detailed Description

template<typename T, typename Operation>
class exprtk::details::assignment_vec_op_node< T, Operation >

Definition at line 13146 of file exprtk.hpp.

Member Typedef Documentation

◆ expression_ptr

Definition at line 13152 of file exprtk.hpp.

◆ vds_t

Definition at line 13154 of file exprtk.hpp.

◆ vector_node_ptr

Definition at line 13153 of file exprtk.hpp.

Constructor & Destructor Documentation

◆ assignment_vec_op_node()

template<typename T , typename Operation >
exprtk::details::assignment_vec_op_node< T, Operation >::assignment_vec_op_node ( const operator_type opr,
expression_ptr  branch0,
expression_ptr  branch1 
)
inline

Definition at line 13158 of file exprtk.hpp.

13162 , vec_node_ptr_(0)
13163 {
13164 if (is_vector_node(branch(0)))
13165 {
13166 vec_node_ptr_ = static_cast<vector_node<T>*>(branch(0));
13167 vds() = vec_node_ptr_->vds();
13168 }
13169
13170 assert(valid());
13171 }
expression_node< T > * branch(const std::size_t &index=0) const
Definition exprtk.hpp:6951
bool match_impl(const Iterator pattern_begin, const Iterator pattern_end, const Iterator data_begin, const Iterator data_end, const typename std::iterator_traits< Iterator >::value_type &zero_or_more, const typename std::iterator_traits< Iterator >::value_type &exactly_one)
Definition exprtk.hpp:598
bool is_vector_node(const expression_node< T > *node)
Definition exprtk.hpp:5750

References exprtk::details::binary_node< T >::branch(), exprtk::details::is_vector_node(), exprtk::details::match_impl(), exprtk::details::assignment_vec_op_node< T, Operation >::valid(), exprtk::details::assignment_vec_op_node< T, Operation >::vds(), and exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Here is the call graph for this function:

Member Function Documentation

◆ base_size()

template<typename T , typename Operation >
std::size_t exprtk::details::assignment_vec_op_node< T, Operation >::base_size ( ) const
inlinevirtual

Implements exprtk::details::vector_interface< T >.

Definition at line 13253 of file exprtk.hpp.

13254 {
13255 return vec_node_ptr_->vec_holder().base_size();
13256 }

References exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Referenced by exprtk::details::assignment_vec_op_node< T, Operation >::valid().

Here is the caller graph for this function:

◆ side_effect()

template<typename T , typename Operation >
bool exprtk::details::assignment_vec_op_node< T, Operation >::side_effect ( ) const
inlinevirtual

Reimplemented from exprtk::details::vector_interface< T >.

Definition at line 13268 of file exprtk.hpp.

13269 {
13270 return true;
13271 }

◆ size()

template<typename T , typename Operation >
std::size_t exprtk::details::assignment_vec_op_node< T, Operation >::size ( ) const
inlinevirtual

Implements exprtk::details::vector_interface< T >.

Definition at line 13248 of file exprtk.hpp.

13249 {
13250 return vec_node_ptr_->vec_holder().size();
13251 }

References exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Referenced by exprtk::details::assignment_vec_op_node< T, Operation >::valid(), and exprtk::details::assignment_vec_op_node< T, Operation >::value().

Here is the caller graph for this function:

◆ type()

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 13235 of file exprtk.hpp.

◆ valid()

template<typename T , typename Operation >
bool exprtk::details::assignment_vec_op_node< T, Operation >::valid ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 13240 of file exprtk.hpp.

13241 {
13242 return
13243 vec_node_ptr_ &&
13244 (size() <= base_size()) &&
13246 }

References exprtk::details::assignment_vec_op_node< T, Operation >::base_size(), exprtk::details::assignment_vec_op_node< T, Operation >::size(), and exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Referenced by exprtk::details::assignment_vec_op_node< T, Operation >::assignment_vec_op_node().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value()

template<typename T , typename Operation >
T exprtk::details::assignment_vec_op_node< T, Operation >::value ( ) const
inlinevirtual

Reimplemented from exprtk::details::expression_node< T >.

Definition at line 13173 of file exprtk.hpp.

13174 {
13175 const T v = branch(1)->value();
13176
13177 T* vec = vds().data();
13178
13179 loop_unroll::details lud(size());
13180 const T* upper_bound = vec + lud.upper_bound;
13181
13182 while (vec < upper_bound)
13183 {
13184 #define exprtk_loop(N) \
13185 Operation::assign(vec[N],v); \
13186
13187 exprtk_loop( 0) exprtk_loop( 1)
13188 exprtk_loop( 2) exprtk_loop( 3)
13189 #ifndef exprtk_disable_superscalar_unroll
13190 exprtk_loop( 4) exprtk_loop( 5)
13191 exprtk_loop( 6) exprtk_loop( 7)
13192 exprtk_loop( 8) exprtk_loop( 9)
13193 exprtk_loop(10) exprtk_loop(11)
13194 exprtk_loop(12) exprtk_loop(13)
13195 exprtk_loop(14) exprtk_loop(15)
13196 #endif
13197
13198 vec += lud.batch_size;
13199 }
13200
13201 switch (lud.remainder)
13202 {
13203 #define case_stmt(N,fall_through) \
13204 case N : Operation::assign(*vec++,v); \
13205 fall_through \
13206
13207 #ifndef exprtk_disable_superscalar_unroll
13214 #endif
13216 case_stmt( 1, (void)0;)
13217 }
13218
13219 #undef exprtk_loop
13220 #undef case_stmt
13221
13222 return vec_node_ptr_->value();
13223 }
#define case_stmt(N)
Definition exprtk.hpp:32731
#define exprtk_fallthrough
Definition exprtk.hpp:86
#define exprtk_loop(N)

References exprtk::details::binary_node< T >::branch(), case_stmt, exprtk::details::vec_data_store< T >::data(), exprtk_fallthrough, exprtk_loop, exprtk::details::match_impl(), exprtk::details::assignment_vec_op_node< T, Operation >::size(), exprtk::details::vector_node< T >::value(), exprtk::details::assignment_vec_op_node< T, Operation >::vds(), exprtk::details::assignment_vec_op_node< T, Operation >::vec(), and exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Here is the call graph for this function:

◆ vds() [1/2]

Implements exprtk::details::vector_interface< T >.

Definition at line 13258 of file exprtk.hpp.

13259 {
13260 return vds_;
13261 }

References exprtk::details::assignment_vec_op_node< T, Operation >::vds_.

Referenced by exprtk::details::assignment_vec_op_node< T, Operation >::assignment_vec_op_node(), and exprtk::details::assignment_vec_op_node< T, Operation >::value().

Here is the caller graph for this function:

◆ vds() [2/2]

template<typename T , typename Operation >
const vds_t & exprtk::details::assignment_vec_op_node< T, Operation >::vds ( ) const
inlinevirtual

Implements exprtk::details::vector_interface< T >.

Definition at line 13263 of file exprtk.hpp.

13264 {
13265 return vds_;
13266 }

References exprtk::details::assignment_vec_op_node< T, Operation >::vds_.

◆ vec() [1/2]

◆ vec() [2/2]

Implements exprtk::details::vector_interface< T >.

Definition at line 13225 of file exprtk.hpp.

13226 {
13227 return vec_node_ptr_;
13228 }

References exprtk::details::assignment_vec_op_node< T, Operation >::vec_node_ptr_.

Referenced by exprtk::details::assignment_vec_op_node< T, Operation >::value().

Here is the caller graph for this function:

Member Data Documentation

◆ vds_

◆ vec_node_ptr_


The documentation for this class was generated from the following file: