64 typedef std::map<std::string, yc_solution_base*>
soln_map;
206 soln->set_description(soln->get_name() +
" radius " + std::to_string(radius));
222 #define MAKE_STEP_INDEX(dim_name) yc_index_node_ptr dim_name = new_step_index(#dim_name)
226 #define MAKE_DOMAIN_INDEX(dim_name) yc_index_node_ptr dim_name = new_domain_index(#dim_name)
230 #define MAKE_MISC_INDEX(dim_name) yc_index_node_ptr dim_name = new_misc_index(#dim_name)
234 #define MAKE_VAR(var_name, ...) \
235 yc_var_proxy var_name = yc_var_proxy(#var_name, get_soln(), { __VA_ARGS__ }, false)
238 #define MAKE_SCRATCH_VAR(var_name, ...) \
239 yc_var_proxy var_name = yc_var_proxy(#var_name, get_soln(), { __VA_ARGS__ }, true)
242 #define MAKE_SCALAR_VAR(var_name) MAKE_VAR(var_name)
246 #define REGISTER_SOLUTION(class_name) \
247 static class_name class_name ## _instance
Bootstrap factory to create objects needed to define a stencil solution.
Definition yask_compiler_api.hpp:96
Factory to create AST nodes.
Definition yc_node_api.hpp:609
virtual yc_index_node_ptr new_step_index(const std::string &name) const
Create a step-index 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_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_index_node_ptr new_domain_index(const std::string &name) const
Create a domain-index node.
Arguments that may be YASK or non-YASK numeric types.
Definition yc_node_api.hpp:563
A base class for defining solutions to be kept in a common registry.
Definition yc_solution_api.hpp:57
yc_index_node_ptr new_misc_index(const std::string &name)
A simple wrapper for yc_node_factory::new_misc_index().
Definition yc_solution_api.hpp:145
yc_number_node_ptr first_domain_index(yc_index_node_ptr dim)
A simple wrapper for yc_node_factory::new_first_domain_index().
Definition yc_solution_api.hpp:157
yc_index_node_ptr new_domain_index(const std::string &name)
A simple wrapper for yc_node_factory::new_domain_index().
Definition yc_solution_api.hpp:139
static soln_map & get_registry()
Access to the registry.
yc_number_node_ptr new_number_node(yc_number_any_arg arg)
A simple wrapper for yc_node_factory::new_number_node().
Definition yc_solution_api.hpp:151
std::map< std::string, yc_solution_base * > soln_map
Type for a common registry shared among all yc_solution_base objects.
Definition yc_solution_api.hpp:64
yc_solution_base(yc_solution_base &base)
[Advanced] Constructor that uses an existing yc_solution_base to share underlying solutions.
yc_solution_ptr get_soln()
Access the underlying solution.
Definition yc_solution_api.hpp:127
yc_number_node_ptr last_domain_index(yc_index_node_ptr dim)
A simple wrapper for yc_node_factory::new_last_domain_index().
Definition yc_solution_api.hpp:163
virtual void define()
Define all functionality of this solution.
yc_solution_base(const std::string &name)
Constructor.
yc_index_node_ptr new_step_index(const std::string &name)
A simple wrapper for yc_node_factory::new_step_index().
Definition yc_solution_api.hpp:133
virtual ~yc_solution_base()
Destructor.
Definition yc_solution_api.hpp:98
A base class for stencils that have a "radius" size parameter.
Definition yc_solution_api.hpp:176
virtual bool set_radius(int radius)
Set radius and updates the solution decription.
Definition yc_solution_api.hpp:203
virtual int get_radius() const
Get radius.
Definition yc_solution_api.hpp:215
yc_solution_with_radius_base(const std::string &name, int radius)
Constructor.
Definition yc_solution_api.hpp:184
virtual void define() override
Define all functionality of this solution.
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_solution > yc_solution_ptr
Shared pointer to yc_solution.
Definition yask_compiler_api.hpp:51
std::shared_ptr< yc_index_node > yc_index_node_ptr
Shared pointer to yc_index_node.
Definition yask_compiler_api.hpp:73