198 const std::string&
format) =0;
253 const std::vector<yc_index_node_ptr>& dims ) =0;
269 const std::initializer_list<yc_index_node_ptr>& dims ) =0;
294 const std::vector<yc_index_node_ptr>& dims ) =0;
311 const std::initializer_list<yc_index_node_ptr>& dims ) =0;
325 virtual std::vector<yc_var_ptr>
376 virtual std::vector<yc_equation_node_ptr>
525 #define CALL_AFTER_NEW_SOLUTION(...) call_after_new_solution(#__VA_ARGS__)
701 const std::vector<yc_index_node_ptr>& dims) {
710 const std::initializer_list<yc_index_node_ptr>& dims) {
719 const std::vector<yc_index_node_ptr>& dims) {
728 const std::initializer_list<yc_index_node_ptr>& dims) {
742 inline std::vector<yc_var_ptr>
812 new_var_point(
const std::initializer_list<yc_number_node_ptr>& index_exprs) = 0;
937 const std::vector< yc_index_node_ptr > &dims,
940 bool is_scratch =
false) {
943 _var = soln->new_scratch_var(name, dims);
945 _var = soln->new_var(name, dims);
960 const std::initializer_list< yc_index_node_ptr > &dims,
963 bool is_scratch =
false) {
966 _var = soln->new_scratch_var(name, dims);
968 _var = soln->new_var(name, dims);
981 _var = soln->new_var(name, { });
1033 operator()(
const std::initializer_list<yc_number_node_ptr>& index_exprs) {
1052 std::vector<yc_number_node_ptr> args;
Base class for all boolean AST nodes.
Definition yc_node_api.hpp:256
Equation node.
Definition yc_node_api.hpp:149
Base class for all AST nodes.
Definition yc_node_api.hpp:125
Bootstrap factory to create objects needed to define a stencil solution.
Definition yask_compiler_api.hpp:96
virtual std::string get_version_string()
Version information.
virtual yc_solution_ptr new_solution(const std::string &name) const
Create a stencil solution.
A dimension or an index in that dimension.
Definition yc_node_api.hpp:272
Arguments that may be YASK or non-YASK numeric types.
Definition yc_node_api.hpp:563
Base class for all numerical AST nodes.
Definition yc_node_api.hpp:247
Arguments that may be YASK numeric pointer types.
Definition yc_node_api.hpp:497
Stencil solution.
Definition yask_compiler_api.hpp:123
virtual std::string get_command_line_help()=0
Return a help-string for the command-line options.
YASK_DEPRECATED std::vector< yc_var_ptr > get_grids()
[Deprecated] Use get_vars().
Definition yask_compiler_api.hpp:743
virtual void set_fold_len(const yc_index_node_ptr dim, int len)=0
Set the vectorization length in given dimension.
virtual yc_var_ptr new_var(const std::string &name, const std::vector< yc_index_node_ptr > &dims)=0
Create an n-dimensional variable in the solution.
virtual void set_target(const std::string &format)=0
Set the output target.
virtual void set_name(std::string name)=0
Set the name of the solution.
YASK_DEPRECATED yc_var_ptr new_grid(const std::string &name, const std::initializer_list< yc_index_node_ptr > &dims)
[Deprecated] Use new_var().
Definition yask_compiler_api.hpp:709
YASK_DEPRECATED int get_num_grids() const
[Deprecated] Use get_num_vars().
Definition yask_compiler_api.hpp:736
virtual int get_num_equations() const =0
Get the number of equations in the solution.
virtual std::vector< yc_var_ptr > get_vars()=0
Get all the vars in the solution.
virtual void set_description(std::string description)=0
Set the description of the solution.
virtual void set_domain_dims(const std::vector< yc_index_node_ptr > &dims)=0
[Advanced] Explicitly define and order the domain dimensions used in the solution.
virtual void clear_dependencies()=0
[Advanced] Remove all existing dependencies.
virtual yc_var_ptr new_var(const std::string &name, const std::initializer_list< yc_index_node_ptr > &dims)=0
Create an n-dimensional variable in the solution.
YASK_DEPRECATED void format(const std::string &format_type, yask_output_ptr output)
[Deprecated] Use set_target() and output_solution().
Definition yask_compiler_api.hpp:691
virtual std::string get_name() const =0
Get the name of the solution.
virtual std::string apply_command_line_options(int argc, char *argv[])=0
Set compiler options from standard C or C++ argc and argv parameters to main().
virtual void set_element_bytes(int nbytes)=0
Set floating-point precision.
virtual void add_flow_dependency(yc_equation_node_ptr from, yc_equation_node_ptr to)=0
[Advanced] Add a dependency between two equations.
virtual int get_element_bytes() const =0
Get current floating-point precision setting.
virtual std::string apply_command_line_options(const std::string &args)=0
Set compiler options from a string.
virtual std::string apply_command_line_options(const string_vec &args)=0
Set compiler options from a vector of strings.
virtual void call_after_new_solution(const std::string &code)=0
[Advanced] Add block of custom C++ code to the kernel solution.
YASK_DEPRECATED yc_var_ptr get_grid(const std::string &name)
[Deprecated] Use get_var().
Definition yask_compiler_api.hpp:750
virtual std::string get_description() const =0
Get the description of the solution.
virtual bool is_dependency_checker_enabled() const =0
[Advanced] Determine whether automatic dependency checker is enabled.
virtual yc_var_ptr get_var(const std::string &name)=0
Get the specified var.
virtual std::vector< yc_equation_node_ptr > get_equations()=0
Get a list of all the defined equations.
YASK_DEPRECATED yc_var_ptr new_grid(const std::string &name, const std::vector< yc_index_node_ptr > &dims)
[Deprecated] Use new_var().
Definition yask_compiler_api.hpp:700
virtual void output_solution(yask_output_ptr output)=0
Optimize and the current equation(s) and write to given output object.
YASK_DEPRECATED yc_var_ptr new_scratch_grid(const std::string &name, const std::vector< yc_index_node_ptr > &dims)
[Deprecated] Use new_scratch_var().
Definition yask_compiler_api.hpp:718
virtual yc_var_ptr new_scratch_var(const std::string &name, const std::initializer_list< yc_index_node_ptr > &dims)=0
Create an n-dimensional scratch variable in the solution.
virtual void call_before_output(output_hook_t hook_fn)=0
[Advanced] Register a function to be called before a solution is output.
virtual void set_prefetch_dist(int level, int distance)=0
Set the prefetch distance for the given cache.
virtual int get_num_vars() const =0
Get the number of vars in the solution.
virtual void set_domain_dims(const std::initializer_list< yc_index_node_ptr > &dims)=0
[Advanced] Explicitly define and order the domain dimensions used in the solution.
virtual std::string get_target()=0
Get the current output-file format.
virtual bool is_folding_set()=0
Determine whether any folding has been set.
virtual bool is_target_set()=0
Determine whether target has been set.
virtual int get_prefetch_dist(int level)=0
Get the current prefetch distance for the given cache.
virtual yc_var_ptr new_scratch_var(const std::string &name, const std::vector< yc_index_node_ptr > &dims)=0
Create an n-dimensional scratch variable in the solution.
virtual void set_dependency_checker_enabled(bool enable)=0
[Advanced] Enable or disable automatic dependency checker.
YASK_DEPRECATED bool is_clustering_set()
[Deprecated] Will be removed in future versions.
Definition yask_compiler_api.hpp:681
YASK_DEPRECATED void set_cluster_mult(const yc_index_node_ptr dim, int mult)
[Deprecated] Does nothing; will be removed in future versions.
Definition yask_compiler_api.hpp:672
virtual std::string get_command_line_values()=0
Return a description of the current settings of the command-line options.
virtual void set_step_dim(const yc_index_node_ptr dim)=0
[Advanced] Explicitly identify the step dimension in the solution.
std::function< void(yc_solution &soln, yask_output_ptr output)> output_hook_t
[Advanced] Callback type for call_before_output().
Definition yask_compiler_api.hpp:470
YASK_DEPRECATED yc_var_ptr new_scratch_grid(const std::string &name, const std::initializer_list< yc_index_node_ptr > &dims)
[Deprecated] Use new_scratch_var().
Definition yask_compiler_api.hpp:727
virtual void clear_folding()=0
Remove all vector-folding settings.
YASK_DEPRECATED void clear_clustering()
[Deprecated] Does nothing; will be removed in future versions.
Definition yask_compiler_api.hpp:686
virtual void set_debug_output(yask_output_ptr debug)=0
Set object to receive debug output.
A reference to a point in a var.
Definition yc_node_api.hpp:285
A wrapper or "proxy" class around a yc_var pointer.
Definition yask_compiler_api.hpp:921
virtual yc_var_point_node_ptr operator()(const yc_number_any_arg i1=nullptr, const yc_number_any_arg i2=nullptr, const yc_number_any_arg i3=nullptr, const yc_number_any_arg i4=nullptr, const yc_number_any_arg i5=nullptr, const yc_number_any_arg i6=nullptr)
Create an expression for a point in a 1-6 dim var.
Definition yask_compiler_api.hpp:1046
virtual yc_var_ptr get_var()
Get the underlying yc_var pointer.
Definition yask_compiler_api.hpp:1002
virtual yc_var_point_node_ptr operator[](const yc_number_any_arg i1)
Create an expression for a point in a one-dim (array) var.
Definition yask_compiler_api.hpp:1088
yc_var_proxy(const std::string &name, yc_solution_ptr soln)
Contructor for a simple scalar YASK variable.
Definition yask_compiler_api.hpp:976
virtual ~yc_var_proxy()
Provide a virtual destructor.
Definition yask_compiler_api.hpp:999
yc_var_proxy(yc_var_ptr &var)
Contructor taking an existing YASK variable.
Definition yask_compiler_api.hpp:989
yc_var_proxy(const std::string &name, yc_solution_ptr soln, const std::initializer_list< yc_index_node_ptr > &dims, bool is_scratch=false)
Contructor taking an initializer_list of index vars.
Definition yask_compiler_api.hpp:955
virtual yc_var_ptr get_var() const
Get the underlying yc_var pointer.
Definition yask_compiler_api.hpp:1007
virtual yc_var_point_node_ptr operator()(const std::vector< yc_number_node_ptr > &index_exprs)
Create an expression for a point in a YASK variable.
Definition yask_compiler_api.hpp:1019
virtual yc_var_point_node_ptr operator()(const std::initializer_list< yc_number_node_ptr > &index_exprs)
Create an expression for a point in a var.
Definition yask_compiler_api.hpp:1033
yc_var_proxy(const std::string &name, yc_solution_ptr soln, const std::vector< yc_index_node_ptr > &dims, bool is_scratch=false)
Contructor taking a vector of index vars.
Definition yask_compiler_api.hpp:932
yc_var_proxy(yc_var_proxy &proxy)
Contructor taking an existing proxy.
Definition yask_compiler_api.hpp:996
A compile-time data variable.
Definition yask_compiler_api.hpp:765
virtual YASK_DEPRECATED yc_var_point_node_ptr new_relative_var_point(const std::vector< int > &dim_offsets)=0
[Deprecated] Use new_var_point().
virtual string_vec get_dim_names() const =0
Get all the dimensions in this var.
YASK_DEPRECATED yc_var_point_node_ptr new_grid_point(const std::initializer_list< yc_number_node_ptr > &index_exprs)
[Deprecated] Use new_var_point().
Definition yask_compiler_api.hpp:870
virtual idx_t get_step_alloc_size() const =0
[Advanced] Get the current allocation in the step dimension of this var.
virtual YASK_DEPRECATED yc_var_point_node_ptr new_relative_var_point(const std::initializer_list< int > &dim_offsets)=0
[Deprecated] Use new_var_point().
virtual void set_dynamic_step_alloc(bool is_dynamic)=0
[Advanced] Set whether the allocation of the step dimension of this var can be modified at run-time.
virtual bool is_dynamic_step_alloc() const =0
[Advanced] Get whether the allocation of the step dimension of this var can be modified at run-time.
virtual int get_num_dims() const =0
Get the number of dimensions.
YASK_DEPRECATED yc_var_point_node_ptr new_grid_point(const std::vector< yc_number_node_ptr > &index_exprs)
[Deprecated] Use new_var_point().
Definition yask_compiler_api.hpp:863
virtual yc_var_point_node_ptr new_var_point(const std::vector< yc_number_node_ptr > &index_exprs)=0
Create a reference to a point in this var.
virtual const std::string & get_name() const =0
Get the name of the var.
virtual YASK_DEPRECATED yc_var_point_node_ptr new_relative_grid_point(const std::initializer_list< int > &dim_offsets)=0
[Deprecated] Use new_var_point().
virtual yc_var_point_node_ptr new_var_point(const std::initializer_list< yc_number_node_ptr > &index_exprs)=0
Create a reference to a point in this var.
virtual YASK_DEPRECATED yc_var_point_node_ptr new_relative_grid_point(const std::vector< int > &dim_offsets)=0
[Deprecated] Use new_var_point().
virtual void set_step_alloc_size(idx_t size)=0
[Advanced] Set the current allocation in the step dimension of this var.
YASK_INT64_T idx_t
Type to use for indexing grids.
Definition yask_common_api.hpp:86
std::vector< std::string > string_vec
Vector of strings.
Definition yask_common_api.hpp:99
std::shared_ptr< yask_output > yask_output_ptr
Shared pointer to yask_output.
Definition yask_common_api.hpp:105
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_number_node > yc_number_node_ptr
Shared pointer to yc_number_node.
Definition yask_compiler_api.hpp:69
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_expr_node > yc_expr_node_ptr
Shared pointer to yc_expr_node.
Definition yask_compiler_api.hpp:61
yc_var * yc_var_ptr
Pointer to yc_var.
Definition yask_compiler_api.hpp:55
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
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
#define YASK_DEPRECATED
Deprecated attribute.
Definition yask_common_api.hpp:60
YASK_DEPRECATED typedef yc_var_point_node yc_grid_point_node
[Deprecated] Use yc_var_point_node.
Definition yask_compiler_api.hpp:1105
YASK_DEPRECATED typedef yc_var_point_node_ptr yc_grid_point_node_ptr
[Deprecated] Use yc_var_point_node_ptr.
Definition yask_compiler_api.hpp:1108
YASK_DEPRECATED typedef yc_var yc_grid
[Deprecated] Use yc_var.
Definition yask_compiler_api.hpp:1099
YASK_DEPRECATED typedef yc_var_ptr yc_grid_ptr
[Deprecated] Use yc_var_ptr.
Definition yask_compiler_api.hpp:1102