YASK
Yet Another Stencil Kit: a software framework for creating HPC stencil code. Copyright 2014-2023 Intel Corporation.
|
A compile-time data variable. More...
#include <yask_compiler_api.hpp>
Public Member Functions | |
virtual const std::string & | get_name () const =0 |
Get the name of the var. | |
virtual int | get_num_dims () const =0 |
Get the number of dimensions. | |
virtual string_vec | get_dim_names () const =0 |
Get all the dimensions in this var. | |
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 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 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 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 idx_t | get_step_alloc_size () const =0 |
[Advanced] Get the current allocation in the step dimension of this var. | |
virtual void | set_step_alloc_size (idx_t size)=0 |
[Advanced] Set the current allocation in the step dimension of this var. | |
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 YASK_DEPRECATED yc_var_point_node_ptr | new_relative_var_point (const std::initializer_list< int > &dim_offsets)=0 |
[Deprecated] Use new_var_point(). | |
YASK_DEPRECATED yc_var_point_node_ptr | new_grid_point (const std::vector< yc_number_node_ptr > &index_exprs) |
[Deprecated] Use new_var_point(). | |
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(). | |
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 YASK_DEPRECATED yc_var_point_node_ptr | new_relative_grid_point (const std::initializer_list< int > &dim_offsets)=0 |
[Deprecated] Use new_var_point(). | |
A compile-time data variable.
"Var" is a generic term for any n-dimensional variable. A 0-dim var is a scalar, a 1-dim var is an array, etc. A compile-time variable is used for constructing stencil equations. It does not contain any data. Data is only stored during run-time, using a yk_var.
Created via yc_solution::new_var() or yc_solution::new_scratch_var() or implicitly via the yc_var_proxy constructor.
|
pure virtual |
Get the name of the var.
|
pure virtual |
Get the number of dimensions.
|
pure virtual |
Get all the dimensions in this var.
This is not necessarily a list of all the dimensions used in the yc_solution.
|
pure virtual |
Create a reference to a point in this var.
Each expression in index_exprs
describes how to access an element in the corresponding dimension of the var.
[in] | index_exprs | Index expressions. These must appear in the same order as when the var was created. |
|
pure virtual |
Create a reference to a point in this var.
C++ initializer-list version with same semantics as the vector version of new_var_point().
See example code shown in yc_solution::new_var().
|
pure virtual |
[Advanced] Get whether the allocation of the step dimension of this var can be modified at run-time.
|
pure virtual |
[Advanced] Set whether the allocation of the step dimension of this var can be modified at run-time.
[in] | is_dynamic | true to enable or false to disable. |
|
pure virtual |
[Advanced] Get the current allocation in the step dimension of this var.
If set_step_alloc_size() has been called, that setting will be returned. If set_step_alloc_size() has not been called, the default setting determined by the YASK compiler will be returned.
|
pure virtual |
[Advanced] Set the current allocation in the step dimension of this var.
Override the default setting determined by the YASK compiler for allocation in the step dimension.
[in] | size | Number of elements to allocate in the step dimension. |