YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
Loading...
Searching...
No Matches
yc_node_api.hpp
Go to the documentation of this file.
1/*****************************************************************************
2
3YASK: Yet Another Stencil Kit
4Copyright (c) 2014-2023, Intel Corporation
5
6Permission is hereby granted, free of charge, to any person obtaining a copy
7of this software and associated documentation files (the "Software"), to
8deal in the Software without restriction, including without limitation the
9rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10sell copies of the Software, and to permit persons to whom the Software is
11furnished to do so, subject to the following conditions:
12
13* The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22IN THE SOFTWARE.
23
24*****************************************************************************/
25
27
28// This file uses Doxygen markup for API documentation-generation.
29// See https://www.doxygen.nl/manual/index.html.
32#pragma once
33
34namespace yask {
35
41 // More node types not exposed except via RTTI.
42
43 class yc_const_number_node;
45 typedef std::shared_ptr<yc_const_number_node> yc_const_number_node_ptr;
46
47 class yc_negate_node;
49 typedef std::shared_ptr<yc_negate_node> yc_negate_node_ptr;
50
53 typedef std::shared_ptr<yc_commutative_number_node> yc_commutative_number_node_ptr;
54
57 typedef std::shared_ptr<yc_binary_number_node> yc_binary_number_node_ptr;
58
61 typedef std::shared_ptr<yc_binary_bool_node> yc_binary_bool_node_ptr;
62
65 typedef std::shared_ptr<yc_binary_comparison_node> yc_binary_comparison_node_ptr;
66
67 class yc_add_node;
69 typedef std::shared_ptr<yc_add_node> yc_add_node_ptr;
70
71 class yc_multiply_node;
73 typedef std::shared_ptr<yc_multiply_node> yc_multiply_node_ptr;
74
75 class yc_subtract_node;
77 typedef std::shared_ptr<yc_subtract_node> yc_subtract_node_ptr;
78
79 class yc_divide_node;
81 typedef std::shared_ptr<yc_divide_node> yc_divide_node_ptr;
82
83 class yc_mod_node;
85 typedef std::shared_ptr<yc_mod_node> yc_mod_node_ptr;
86
87 class yc_not_node;
89 typedef std::shared_ptr<yc_not_node> yc_not_node_ptr;
90
91 class yc_equals_node;
93 typedef std::shared_ptr<yc_equals_node> yc_equals_node_ptr;
94
97 typedef std::shared_ptr<yc_not_equals_node> yc_not_equals_node_ptr;
98
101 typedef std::shared_ptr<yc_less_than_node> yc_less_than_node_ptr;
102
105 typedef std::shared_ptr<yc_greater_than_node> yc_greater_than_node_ptr;
106
109 typedef std::shared_ptr<yc_not_less_than_node> yc_not_less_than_node_ptr;
110
113 typedef std::shared_ptr<yc_not_greater_than_node> yc_not_greater_than_node_ptr;
114
115 class yc_and_node;
117 typedef std::shared_ptr<yc_and_node> yc_and_node_ptr;
118
119 class yc_or_node;
121 typedef std::shared_ptr<yc_or_node> yc_or_node_ptr;
122
124
126 public:
127 virtual ~yc_expr_node() {}
128
130
134 virtual std::string format_simple() const =0;
135
137
141 virtual int get_num_nodes() const =0;
142 };
143
145
149 class yc_equation_node : public virtual yc_expr_node {
150 public:
151
153
155
157
159
161
164
166
207 virtual void set_cond(yc_bool_node_ptr sub_domain_cond ) =0;
211
213
236 virtual void set_step_cond(yc_bool_node_ptr step_cond ) =0;
240
242 virtual yc_equation_node_ptr clone_ast() const =0;
243 };
244
246
247 class yc_number_node : public virtual yc_expr_node {
248 public:
249
251 virtual yc_number_node_ptr clone_ast() const =0;
252 };
253
255
256 class yc_bool_node : public virtual yc_expr_node {
257 public:
258
260 virtual yc_bool_node_ptr clone_ast() const =0;
261 };
262
264
272 class yc_index_node : public virtual yc_number_node {
273 public:
274
276
277 virtual const std::string&
278 get_name() const =0;
279 };
280
282
285 class yc_var_point_node : public virtual yc_number_node {
286 public:
287
289
290 virtual yc_var_ptr
292
295 inline yc_var_ptr
297 return get_var();
298 }
299 };
300
302
306 class yc_const_number_node : public virtual yc_number_node {
307 public:
308
310
312 virtual void
313 set_value(double val ) =0;
314
316
317 virtual double
318 get_value() const =0;
319 };
320
322
325 class yc_negate_node : public virtual yc_number_node {
326 public:
327
329
332 virtual yc_number_node_ptr
334 };
335
337
340 public:
341
343
348 virtual int
350
352
353 virtual std::vector<yc_number_node_ptr>
355
357 virtual void
359 };
360
362
363 class yc_add_node : public virtual yc_commutative_number_node { };
364
366
368
370
372 class yc_binary_number_node : public virtual yc_number_node {
373 public:
374
376 virtual yc_number_node_ptr
378
380 virtual yc_number_node_ptr
382 };
383
385
386 class yc_subtract_node : public virtual yc_binary_number_node { };
387
389
390 class yc_divide_node : public virtual yc_binary_number_node { };
391
393
394 class yc_mod_node : public virtual yc_binary_number_node { };
395
397
400 class yc_not_node : public virtual yc_bool_node {
401 public:
402
404
405 virtual yc_bool_node_ptr
407 };
408
410 class yc_binary_bool_node : public virtual yc_bool_node {
411 public:
412
414 virtual yc_bool_node_ptr
416
418 virtual yc_bool_node_ptr
420 };
421
423
426 class yc_and_node : public virtual yc_binary_bool_node { };
427
429
432 class yc_or_node : public virtual yc_binary_bool_node { };
433
436 public:
437
439
440 virtual yc_number_node_ptr
442
444
445 virtual yc_number_node_ptr
447 };
448
450
453 class yc_equals_node : public virtual yc_binary_comparison_node { };
454
456
460
462
466
468
472
474
478
480
484
485 #ifndef SWIG
487
513
515
550
552
604 #endif
605
607
610 public:
611 virtual ~yc_node_factory() {}
612
614
620 virtual yc_index_node_ptr
621 new_step_index(const std::string& name ) const;
623
625
637 virtual yc_index_node_ptr
638 new_domain_index(const std::string& name ) const;
640
642
650 virtual yc_index_node_ptr
651 new_misc_index(const std::string& name ) const;
653
655
686 yc_bool_node_ptr sub_domain_cond = nullptr ) const;
689
690 #ifndef SWIG
692
697 virtual yc_number_node_ptr
700 return std::move(arg);
701 }
702 #endif
703
705
711 virtual yc_number_node_ptr
712 new_const_number_node(double val ) const;
714
716
722 virtual yc_number_node_ptr
725
727
732 virtual yc_number_node_ptr
735
737
743 virtual yc_number_node_ptr
745 yc_number_node_ptr rhs ) const;
746
748
754 virtual yc_number_node_ptr
756 yc_number_node_ptr rhs ) const;
757
759
769 virtual yc_number_node_ptr
771 yc_number_node_ptr rhs ) const;
772
774
781 virtual yc_number_node_ptr
783 yc_number_node_ptr rhs ) const;
784
786
793 virtual yc_number_node_ptr
795 yc_number_node_ptr rhs ) const;
796
798
807 virtual yc_index_node_ptr
810
812
821 virtual yc_index_node_ptr
824
826
832 virtual yc_bool_node_ptr
834
836
842 virtual yc_bool_node_ptr
844 yc_bool_node_ptr rhs ) const;
845
847
853 virtual yc_bool_node_ptr
855 yc_bool_node_ptr rhs ) const;
856
858
863 virtual yc_bool_node_ptr
865 yc_number_node_ptr rhs ) const;
866
868
873 virtual yc_bool_node_ptr
875 yc_number_node_ptr rhs ) const;
876
878
883 virtual yc_bool_node_ptr
885 yc_number_node_ptr rhs ) const;
886
888
893 virtual yc_bool_node_ptr
895 yc_number_node_ptr rhs ) const;
896
898
903 virtual yc_bool_node_ptr
905 yc_number_node_ptr rhs ) const;
906
908
913 virtual yc_bool_node_ptr
915 yc_number_node_ptr rhs ) const;
916
917 };
918
920 #define UNARY_MATH_EXPR(fn_name) \
921 yc_number_node_ptr fn_name(const yc_number_node_ptr rhs)
922
941 #undef UNARY_MATH_EXPR
942
944 #define BINARY_MATH_EXPR(fn_name) \
945 yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, const yc_number_node_ptr arg2); \
946 yc_number_node_ptr fn_name(double arg1, const yc_number_node_ptr arg2); \
947 yc_number_node_ptr fn_name(const yc_number_node_ptr arg1, double arg2)
948
950
955
957
962
963
965
970
971 #undef BINARY_MATH_EXPR
972
973 #if !defined SWIG
974
975 // Non-class operators.
976 // These are not defined for SWIG because
977 // the Python operators are defined in the ".i" file.
978 // For the binary operators, we define 3 combinations to implicitly
979 // avoid the const-const combinations, which conflict with built-in
980 // operators on fundamental C++ types, e.g., '5+8'.
981
984
991
998
1005
1012
1019
1024
1029
1034
1039
1041
1043
1045
1047
1049
1051
1053
1059 #define BOOL_OPER(oper, fn) \
1060 inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_number_node_ptr rhs) { \
1061 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1062 inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_index_node_ptr rhs) { \
1063 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1064 inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1065 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1066 inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_number_node_ptr rhs) { \
1067 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1068 inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_index_node_ptr rhs) { \
1069 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1070 inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1071 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1072 inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_number_node_ptr rhs) { \
1073 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1074 inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_index_node_ptr rhs) { \
1075 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1076 inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, const yc_var_point_node_ptr rhs) { \
1077 yc_node_factory nfac; return nfac.fn(lhs, rhs); } \
1078 inline yc_bool_node_ptr operator oper(const yc_number_node_ptr lhs, double rhs) { \
1079 yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1080 inline yc_bool_node_ptr operator oper(const yc_index_node_ptr lhs, double rhs) { \
1081 yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); } \
1082 inline yc_bool_node_ptr operator oper(const yc_var_point_node_ptr lhs, double rhs) { \
1083 yc_node_factory nfac; return nfac.fn(lhs, nfac.new_number_node(rhs)); }
1084
1085 BOOL_OPER(==, new_equals_node)
1086 BOOL_OPER(!=, new_not_equals_node)
1087 BOOL_OPER(<, new_less_than_node)
1088 BOOL_OPER(>, new_greater_than_node)
1089 BOOL_OPER(<=, new_not_greater_than_node)
1090 BOOL_OPER(>=, new_not_less_than_node)
1091 #undef BOOL_OPER
1092
1094
1102 #define EQUALS <<
1103
1106
1108
1112 #define IF_DOMAIN ^=
1113
1116 const yc_bool_node_ptr cond);
1117
1119
1123 #define IF_STEP |=
1124
1127 const yc_bool_node_ptr cond);
1128
1129 #endif // !SWIG.
1130
1133} // namespace yask.
An addition node.
Definition yc_node_api.hpp:363
A boolean 'and' operator.
Definition yc_node_api.hpp:426
Base class for boolean binary operators that take boolean inputs.
Definition yc_node_api.hpp:410
virtual yc_bool_node_ptr get_lhs()=0
Get the left-hand-side operand.
virtual yc_bool_node_ptr get_rhs()=0
Get the right-hand-side operand.
Base class for boolean binary operators that take numerical inputs.
Definition yc_node_api.hpp:435
virtual yc_number_node_ptr get_lhs()=0
Get the left-hand-side operand.
virtual yc_number_node_ptr get_rhs()=0
Get the right-hand-side operand.
Base class for numerical binary operators.
Definition yc_node_api.hpp:372
virtual yc_number_node_ptr get_lhs()=0
Get the left-hand-side operand.
virtual yc_number_node_ptr get_rhs()=0
Get the right-hand-side operand.
Base class for all boolean AST nodes.
Definition yc_node_api.hpp:256
virtual yc_bool_node_ptr clone_ast() const =0
Create a deep copy of AST starting with this node.
Base class for commutative numerical operators.
Definition yc_node_api.hpp:339
virtual void add_operand(yc_number_node_ptr node)=0
Add an operand.
virtual int get_num_operands()=0
Get the number of operands.
virtual std::vector< yc_number_node_ptr > get_operands()=0
Get a list of the operands.
A constant numerical value.
Definition yc_node_api.hpp:306
virtual double get_value() const =0
Get the stored value.
virtual void set_value(double val)=0
Set the value.
A division node.
Definition yc_node_api.hpp:390
A numerical-comparison 'equals' operator.
Definition yc_node_api.hpp:453
Equation node.
Definition yc_node_api.hpp:149
virtual yc_equation_node_ptr clone_ast() const =0
Create a deep copy of AST starting with this node.
virtual yc_bool_node_ptr get_cond()=0
Get the condition describing the sub-domain.
virtual yc_number_node_ptr get_rhs()=0
Get the right-hand-side operand.
virtual yc_var_point_node_ptr get_lhs()=0
Get the left-hand-side operand.
virtual void set_step_cond(yc_bool_node_ptr step_cond)=0
Set the condition describing when the equation is valid.
virtual void set_cond(yc_bool_node_ptr sub_domain_cond)=0
Set the condition describing the sub-domain for this equation.
Base class for all AST nodes.
Definition yc_node_api.hpp:125
virtual std::string format_simple() const =0
Create a simple human-readable string.
virtual int get_num_nodes() const =0
Count the size of the AST.
A numerical-comparison 'greater_than' operator.
Definition yc_node_api.hpp:471
A dimension or an index in that dimension.
Definition yc_node_api.hpp:272
virtual const std::string & get_name() const =0
Get the dimension's name.
A numerical-comparison 'less_than' operator.
Definition yc_node_api.hpp:465
A modulo node.
Definition yc_node_api.hpp:394
A multiplication node.
Definition yc_node_api.hpp:367
A numerical negation operator.
Definition yc_node_api.hpp:325
virtual yc_number_node_ptr get_rhs()=0
Get the [only] operand.
Factory to create AST nodes.
Definition yc_node_api.hpp:609
virtual yc_number_node_ptr new_multiply_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a multiplication node.
virtual yc_number_node_ptr new_add_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create an addition node.
virtual yc_bool_node_ptr new_not_greater_than_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'less-than or equals' node.
virtual yc_number_node_ptr new_negate_node(yc_number_node_ptr rhs) const
Create a numerical negation operator node.
virtual yc_number_node_ptr new_divide_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a division node.
virtual yc_number_node_ptr new_mod_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a modulo node.
virtual yc_equation_node_ptr new_equation_node(yc_var_point_node_ptr lhs, yc_number_node_ptr rhs, yc_bool_node_ptr sub_domain_cond=nullptr) const
Create an equation node.
virtual yc_bool_node_ptr new_or_node(yc_bool_node_ptr lhs, yc_bool_node_ptr rhs) const
Create a boolean 'or' node.
virtual yc_index_node_ptr new_step_index(const std::string &name) const
Create a step-index node.
virtual yc_number_node_ptr new_const_number_node(double val) const
Create a constant numerical-value node.
virtual yc_bool_node_ptr new_not_less_than_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'greater-than or equals' node.
virtual yc_bool_node_ptr new_not_node(yc_bool_node_ptr rhs) const
Create a binary inverse operator node.
virtual yc_bool_node_ptr new_equals_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'equals' node.
virtual yc_bool_node_ptr new_greater_than_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'greater-than' node.
virtual yc_index_node_ptr new_first_domain_index(yc_index_node_ptr idx) const
Create a symbol for the first index value in a given dimension.
virtual yc_index_node_ptr new_last_domain_index(yc_index_node_ptr idx) const
Create a symbol for the last index value in a given dimension.
virtual yc_bool_node_ptr new_and_node(yc_bool_node_ptr lhs, yc_bool_node_ptr rhs) const
Create a boolean 'and' node.
virtual yc_number_node_ptr new_const_number_node(idx_t val) const
Create a constant numerical value node.
virtual yc_number_node_ptr new_number_node(yc_number_any_arg arg) const
Create a numerical-value expression node.
Definition yc_node_api.hpp:698
virtual yc_index_node_ptr new_misc_index(const std::string &name) const
Create a new miscellaneous index.
virtual yc_bool_node_ptr new_less_than_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'less-than' node.
virtual yc_number_node_ptr new_subtract_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a subtraction node.
virtual yc_index_node_ptr new_domain_index(const std::string &name) const
Create a domain-index node.
virtual yc_bool_node_ptr new_not_equals_node(yc_number_node_ptr lhs, yc_number_node_ptr rhs) const
Create a numerical-comparison 'not-equals' node.
A numerical-comparison 'not_equals' operator.
Definition yc_node_api.hpp:459
A numerical-comparison 'not_greater_than' operator.
Definition yc_node_api.hpp:483
A numerical-comparison 'not_less_than' operator.
Definition yc_node_api.hpp:477
A boolean inversion operator.
Definition yc_node_api.hpp:400
virtual yc_bool_node_ptr get_rhs()=0
Get the [only] operand.
Arguments that may be YASK or non-YASK numeric types.
Definition yc_node_api.hpp:563
yc_number_any_arg(idx_t i)
Arg can be an index type.
Definition yc_node_api.hpp:585
yc_number_any_arg(std::nullptr_t p)
Arg can be a null pointer.
Definition yc_node_api.hpp:601
yc_number_any_arg(int i)
Arg can be an int.
Definition yc_node_api.hpp:589
yc_number_any_arg(yc_index_node_ptr p)
Arg can be an index-node pointer.
Definition yc_node_api.hpp:577
yc_number_node_ptr _convert_const(double val) const
Create an argument from a constant value.
yc_number_any_arg(yc_var_point_node_ptr p)
Arg can be a var-point-node pointer.
Definition yc_node_api.hpp:581
yc_number_any_arg(double f)
Arg can be a double.
Definition yc_node_api.hpp:593
yc_number_any_arg(yc_number_node_ptr p)
Arg can be a number-node pointer.
Definition yc_node_api.hpp:573
yc_number_any_arg(float f)
Arg can be a float.
Definition yc_node_api.hpp:597
Arguments that may be non-YASK numeric types.
Definition yc_node_api.hpp:525
yc_number_node_ptr _convert_const(double val) const
Create an argument from a constant value.
yc_number_const_arg(idx_t i)
Arg can be an index type.
Definition yc_node_api.hpp:535
yc_number_const_arg(float f)
Arg can be a float.
Definition yc_node_api.hpp:547
yc_number_const_arg(int i)
Arg can be an int.
Definition yc_node_api.hpp:539
yc_number_const_arg(double f)
Arg can be a double.
Definition yc_node_api.hpp:543
Base class for all numerical AST nodes.
Definition yc_node_api.hpp:247
virtual yc_number_node_ptr clone_ast() const =0
Create a deep copy of AST starting with this node.
Arguments that may be YASK numeric pointer types.
Definition yc_node_api.hpp:497
yc_number_ptr_arg(yc_index_node_ptr p)
Arg can be an index-node pointer.
Definition yc_node_api.hpp:506
yc_number_ptr_arg(yc_var_point_node_ptr p)
Arg can be a var-point-node pointer.
Definition yc_node_api.hpp:510
yc_number_ptr_arg(yc_number_node_ptr p)
Arg can be a number-node pointer.
Definition yc_node_api.hpp:502
A boolean 'or' operator.
Definition yc_node_api.hpp:432
A subtraction node.
Definition yc_node_api.hpp:386
A reference to a point in a var.
Definition yc_node_api.hpp:285
virtual yc_var_ptr get_var()=0
Get the var this point is in.
YASK_DEPRECATED yc_var_ptr get_grid()
[Deprecated] Use get_var().
Definition yc_node_api.hpp:296
A compile-time data variable.
Definition yask_compiler_api.hpp:765
YASK_INT64_T idx_t
Type to use for indexing grids.
Definition yask_common_api.hpp:86
std::shared_ptr< yc_const_number_node > yc_const_number_node_ptr
Shared pointer to yc_const_number_node.
Definition yc_node_api.hpp:45
std::shared_ptr< yc_commutative_number_node > yc_commutative_number_node_ptr
Shared pointer to yc_commutative_number_node.
Definition yc_node_api.hpp:53
void operator+=(yc_number_node_ptr &lhs, yc_number_node_ptr rhs)
Shortcut for creating expression A = A + B.
std::shared_ptr< yc_not_node > yc_not_node_ptr
Shared pointer to yc_not_node.
Definition yc_node_api.hpp:89
std::shared_ptr< yc_greater_than_node > yc_greater_than_node_ptr
Shared pointer to yc_greater_than_node.
Definition yc_node_api.hpp:105
#define BOOL_OPER(oper, fn)
Binary numerical-to-boolean operators. Used internally to define ==, <, etc.
Definition yc_node_api.hpp:1059
std::shared_ptr< yc_binary_comparison_node > yc_binary_comparison_node_ptr
Shared pointer to yc_binary_comparison_node.
Definition yc_node_api.hpp:65
std::shared_ptr< yc_not_equals_node > yc_not_equals_node_ptr
Shared pointer to yc_not_equals_node.
Definition yc_node_api.hpp:97
std::shared_ptr< yc_bool_node > yc_bool_node_ptr
Shared pointer to yc_bool_node.
Definition yask_compiler_api.hpp:65
std::shared_ptr< yc_not_less_than_node > yc_not_less_than_node_ptr
Shared pointer to yc_not_less_than_node.
Definition yc_node_api.hpp:109
std::shared_ptr< yc_number_node > yc_number_node_ptr
Shared pointer to yc_number_node.
Definition yask_compiler_api.hpp:69
std::shared_ptr< yc_multiply_node > yc_multiply_node_ptr
Shared pointer to yc_multiply_node.
Definition yc_node_api.hpp:73
std::shared_ptr< yc_binary_number_node > yc_binary_number_node_ptr
Shared pointer to yc_binary_number_node.
Definition yc_node_api.hpp:57
std::shared_ptr< yc_divide_node > yc_divide_node_ptr
Shared pointer to yc_divide_node.
Definition yc_node_api.hpp:81
void operator-=(yc_number_node_ptr &lhs, yc_number_node_ptr rhs)
Shortcut for creating expression A = A - B.
std::shared_ptr< yc_equation_node > yc_equation_node_ptr
Shared pointer to yc_equation_node.
Definition yask_compiler_api.hpp:77
std::shared_ptr< yc_subtract_node > yc_subtract_node_ptr
Shared pointer to yc_subtract_node.
Definition yc_node_api.hpp:77
yc_number_node_ptr operator*(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs)
Operator version of yc_node_factory::new_multiply_node().
void operator*=(yc_number_node_ptr &lhs, yc_number_node_ptr rhs)
Shortcut for creating expression A = A * B.
yc_bool_node_ptr operator!(yc_bool_node_ptr rhs)
Operator version of yc_node_factory::new_not_node().
#define IF_STEP
Recommended macro to make the step-condition operator readable and self-explanatory.
Definition yc_node_api.hpp:1123
std::shared_ptr< yc_and_node > yc_and_node_ptr
Shared pointer to yc_and_node.
Definition yc_node_api.hpp:117
#define UNARY_MATH_EXPR(fn_name)
Unary math functions. Used internally to define sqrt(), sin(), etc.
Definition yc_node_api.hpp:920
std::shared_ptr< yc_less_than_node > yc_less_than_node_ptr
Shared pointer to yc_less_than_node.
Definition yc_node_api.hpp:101
std::shared_ptr< yc_not_greater_than_node > yc_not_greater_than_node_ptr
Shared pointer to yc_not_greater_than_node.
Definition yc_node_api.hpp:113
yc_bool_node_ptr operator&&(yc_bool_node_ptr lhs, yc_bool_node_ptr rhs)
Operator version of yc_node_factory::new_and_node().
std::shared_ptr< yc_add_node > yc_add_node_ptr
Shared pointer to yc_add_node.
Definition yc_node_api.hpp:69
std::shared_ptr< yc_var_point_node > yc_var_point_node_ptr
Shared pointer to yc_var_point_node.
Definition yask_compiler_api.hpp:81
#define BINARY_MATH_EXPR(fn_name)
Binary math functions. Used internally.
Definition yc_node_api.hpp:944
yc_number_node_ptr operator%(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs)
Operator version of yc_node_factory::new_mod_node().
#define EQUALS
Recommended macro to make the "equality" operator readable and self-explanatory.
Definition yc_node_api.hpp:1102
std::shared_ptr< yc_binary_bool_node > yc_binary_bool_node_ptr
Shared pointer to yc_binary_bool_node.
Definition yc_node_api.hpp:61
yc_bool_node_ptr operator||(yc_bool_node_ptr lhs, yc_bool_node_ptr rhs)
Operator version of yc_node_factory::new_or_node().
std::shared_ptr< yc_index_node > yc_index_node_ptr
Shared pointer to yc_index_node.
Definition yask_compiler_api.hpp:73
yc_number_node_ptr operator-(yc_number_ptr_arg rhs)
Operator version of yc_node_factory::new_negate_node().
std::shared_ptr< yc_equals_node > yc_equals_node_ptr
Shared pointer to yc_equals_node.
Definition yc_node_api.hpp:93
yc_number_node_ptr operator+(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs)
Operator version of yc_node_factory::new_add_node().
std::shared_ptr< yc_negate_node > yc_negate_node_ptr
Shared pointer to yc_negate_node.
Definition yc_node_api.hpp:49
#define IF_DOMAIN
Recommended macro to make the domain-condition operator readable and self-explanatory.
Definition yc_node_api.hpp:1112
std::shared_ptr< yc_or_node > yc_or_node_ptr
Shared pointer to yc_or_node.
Definition yc_node_api.hpp:121
void operator/=(yc_number_node_ptr &lhs, yc_number_node_ptr rhs)
Shortcut for creating expression A = A / B.
yc_number_node_ptr operator/(yc_number_ptr_arg lhs, yc_number_ptr_arg rhs)
Operator version of yc_node_factory::new_divide_node().
std::shared_ptr< yc_mod_node > yc_mod_node_ptr
Shared pointer to yc_mod_node.
Definition yc_node_api.hpp:85
#define YASK_DEPRECATED
Deprecated attribute.
Definition yask_common_api.hpp:60