639 bool strict_indices =
true ) =0;
658 bool strict_indices =
true ) =0;
706 const idx_t_vec& last_indices )
const =0;
750 const idx_t_vec& last_indices )
const =0;
777 bool strict_indices =
true ) =0;
792 bool strict_indices =
true ) =0;
836 bool strict_indices =
true ) =0;
933 #ifdef COPY_SLICE_IMPLEMENTED
959 const idx_t_vec& last_target_indices ) =0;
1074 bool strict_indices =
true ) =0;
1453 const idx_t_vec& last_indices )
const =0;
Class returned from reduce_elements_in_slice().
Definition yk_var_api.hpp:984
virtual double get_min() const =0
Get min.
virtual double get_product() const =0
Get product.
virtual int get_reduction_mask() const =0
Get the allowed reductions.
virtual double get_max() const =0
Get max.
virtual double get_sum_squares() const =0
Get sum of squares.
virtual idx_t get_num_elements_reduced() const =0
Get the number of elements reduced.
virtual double get_sum() const =0
Get sum.
A run-time YASK data container.
Definition yk_var_api.hpp:185
virtual idx_t_vec get_last_local_index_vec() const =0
Get the last valid index in this rank in all dimensions in this var.
virtual YASK_DEPRECATED idx_t get_first_rank_alloc_index(const std::string &dim) const
[Deprecated] Use get_first_local_index().
Definition yk_var_api.hpp:1475
virtual void set_right_min_pad_size(const std::string &dim, idx_t size)=0
[Advanced] Set the minimum right padding in the specified dimension.
virtual int get_numa_preferred() const =0
[Advanced] Get the default preferred NUMA node on which to allocate data.
virtual YASK_DEPRECATED idx_t get_elements_in_slice(void *buffer_ptr, const idx_t_vec &first_indices, const idx_t_vec &last_indices) const =0
[Deprecated] Use the float* or double* version.
virtual void set_all_elements_same(double val)=0
Initialize all var elements to the same value.
virtual yk_reduction_result_ptr reduce_elements_in_slice(int reduction_mask, const idx_t_vec &first_indices, const idx_t_vec &last_indices, bool strict_indices=true)=0
Perform requested reductions over elements within specified subset of the var.
virtual void set_min_pad_size(const std::string &dim, idx_t size)=0
[Advanced] Set the minimum padding in the specified dimension.
virtual idx_t get_alloc_size(const std::string &dim) const =0
Get the number of elements allocated in the specified dimension.
static constexpr int yk_max_reduction
Bitmask for maximum-value reduction.
Definition yk_var_api.hpp:974
virtual idx_t get_left_pad_size(const std::string &dim) const =0
Get the actual left padding in the specified dimension.
virtual int get_halo_exchange_l1_norm() const =0
[Advanced] Get the maximum L1-norm of a neighbor rank for halo exchange.
virtual idx_t_vec get_rank_domain_size_vec() const =0
Get the domain size for this rank in all domain dimensions in this var.
virtual bool is_storage_layout_identical(const yk_var_ptr other) const =0
[Advanced] Determines whether storage layout is the same as another var.
virtual idx_t get_first_rank_halo_index(const std::string &dim) const =0
Get the first index of the left halo in this rank in the specified dimension.
virtual void set_left_min_pad_size(const std::string &dim, idx_t size)=0
[Advanced] Set the minimum left padding in the specified dimension.
virtual bool is_storage_allocated() const =0
[Advanced] Determine whether storage has been allocated.
virtual idx_t_vec get_first_local_index_vec() const =0
Get the first valid index in this rank in all dimensions in this var.
virtual bool are_indices_local(const idx_t_vec &indices) const =0
Determine whether the given indices refer to an accessible element in this rank.
virtual idx_t get_rank_domain_size(const std::string &dim) const =0
Get the domain size for this rank in the specified dimension.
static constexpr int yk_min_reduction
Bitmask for minimum-value reduction.
Definition yk_var_api.hpp:977
virtual bool is_fixed_size() const =0
Determine whether this var is not automatically resized based on the solution.
virtual idx_t set_element(double val, const idx_t_init_list &indices, bool strict_indices=true)=0
Set the value of one element in this var.
virtual idx_t get_right_pad_size(const std::string &dim) const =0
Get the actual right padding in the specified dimension.
virtual idx_t_vec get_first_rank_domain_index_vec() const =0
Get the first index of the sub-domain in this rank in all domain dimensions in this var.
virtual idx_t get_num_storage_bytes() const =0
[Advanced] Determine size of raw storage in bytes.
virtual idx_t set_elements_in_slice(const double *buffer_ptr, size_t buffer_size, const idx_t_vec &first_indices, const idx_t_vec &last_indices)=0
Set elements within specified subset of the var from values in a double buffer.
virtual void * get_raw_storage_buffer()=0
[Advanced] Get pointer to raw data storage buffer.
virtual std::string format_indices(const idx_t_vec &indices) const =0
Format the indices for human-readable display.
virtual void set_first_misc_index(const std::string &dim, idx_t idx)=0
[Advanced] Set the first index of a specified miscellaneous dimension.
virtual idx_t set_elements_in_slice(const float *buffer_ptr, size_t buffer_size, const idx_t_vec &first_indices, const idx_t_vec &last_indices)=0
Set elements within specified subset of the var from values in a float buffer.
virtual void set_halo_exchange_l1_norm(int norm)=0
[Advanced] Set the maximum L1-norm of a neighbor rank for halo exchange.
virtual idx_t get_first_rank_domain_index(const std::string &dim) const =0
Get the first index of the sub-domain in this rank in the specified dimension.
virtual idx_t get_elements_in_slice(double *buffer_ptr, size_t buffer_size, const idx_t_vec &first_indices, const idx_t_vec &last_indices) const =0
Copy elements within specified subset of this var into a double buffer.
virtual idx_t get_first_valid_step_index() const =0
Get the first valid index in the step dimension.
virtual void set_right_halo_size(const std::string &dim, idx_t size)=0
[Advanced] Set the right halo size in the specified dimension.
static constexpr int yk_sum_squares_reduction
Bitmask for sum-of-squares reduction.
Definition yk_var_api.hpp:968
virtual void set_halo_size(const std::string &dim, idx_t size)=0
[Advanced] Set the left and right halo sizes in the specified dimension.
virtual idx_t get_last_local_index(const std::string &dim) const =0
Get the last index in this rank in the specified dimension.
static constexpr int yk_product_reduction
Bitmask for product reduction.
Definition yk_var_api.hpp:971
virtual idx_t get_num_storage_elements() const =0
[Advanced] Determine size of raw storage in elements.
virtual idx_t get_last_valid_step_index() const =0
Get the last valid index in the step dimension.
virtual void set_alloc_size(const std::string &dim, idx_t size)=0
[Advanced] Set the number of elements to allocate in the specified dimension.
virtual idx_t get_elements_in_slice(float *buffer_ptr, size_t buffer_size, const idx_t_vec &first_indices, const idx_t_vec &last_indices) const =0
Copy elements within specified subset of this var into a float buffer.
virtual void set_left_halo_size(const std::string &dim, idx_t size)=0
[Advanced] Set the left halo size in the specified dimension.
virtual bool are_indices_local(const idx_t_init_list &indices) const =0
Determine whether the given indices refer to an accessible element in this rank.
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 release_storage()=0
[Advanced] Explicitly release any allocated data-storage for this var.
virtual idx_t get_first_misc_index(const std::string &dim) const =0
Get the first index of a specified miscellaneous dimension.
virtual void fuse_vars(yk_var_ptr source)=0
[Advanced] Merge this var with another var.
virtual void alloc_storage()=0
[Advanced] Explicitly allocate data-storage memory for this var.
virtual int get_num_dims() const =0
Get the number of dimensions used in this var.
virtual idx_t_vec get_last_rank_halo_index_vec() const =0
Get the last index of the right halo in this rank in all domain dimensions in this var.
virtual idx_t add_to_element(double val, const idx_t_vec &indices, bool strict_indices=true)=0
Atomically add to the value of one var element.
virtual idx_t get_last_rank_domain_index(const std::string &dim) const =0
Get the last index of the sub-domain in this rank in the specified dimension.
virtual idx_t get_first_local_index(const std::string &dim) const =0
Get the first valid index in this rank in the specified dimension.
virtual idx_t_vec get_first_rank_halo_index_vec() const =0
Get the first index of the left halo in this rank in all domain dimensions in this var.
virtual const std::string & get_name() const =0
Get the name of the var.
virtual idx_t get_last_misc_index(const std::string &dim) const =0
Get the last index of a specified miscellaneous dimension.
virtual YASK_DEPRECATED idx_t set_elements_in_slice(const void *buffer_ptr, const idx_t_vec &first_indices, const idx_t_vec &last_indices)=0
[Deprecated] Use the float* or double* version.
virtual idx_t_vec get_last_rank_domain_index_vec() const =0
Get the last index of the sub-domain in this rank in all domain dimensions in this var.
static constexpr int yk_sum_reduction
Bitmask for sum reduction.
Definition yk_var_api.hpp:965
virtual idx_t set_element(double val, const idx_t_vec &indices, bool strict_indices=true)=0
Set the value of one element in this var.
std::shared_ptr< yk_reduction_result > yk_reduction_result_ptr
Shared pointer to yk_reduction_result.
Definition yk_var_api.hpp:1048
virtual bool set_numa_preferred(int numa_node)=0
[Advanced] Set the default preferred NUMA node on which to allocate data.
virtual YASK_DEPRECATED idx_t get_last_rank_alloc_index(const std::string &dim) const
[Deprecated] Use get_last_local_index().
Definition yk_var_api.hpp:1482
virtual idx_t get_left_halo_size(const std::string &dim) const =0
Get the left halo size in the specified dimension.
virtual bool is_dim_used(const std::string &dim) const =0
Determine whether specified dimension exists in this var.
virtual idx_t get_last_rank_halo_index(const std::string &dim) const =0
Get the last index of the right halo in this rank in the specified dimension.
virtual idx_t set_elements_in_slice_same(double val, const idx_t_vec &first_indices, const idx_t_vec &last_indices, bool strict_indices=true)=0
Initialize var elements within specified subset of the var to the same value.
virtual string_vec get_dim_names() const =0
Get all the dimensions in this var.
virtual idx_t add_to_element(double val, const idx_t_init_list &indices, bool strict_indices=true)=0
Atomically add to the value of one var element.
virtual idx_t get_left_extra_pad_size(const std::string &dim) const =0
Get the actual extra left padding in the specified dimension.
virtual std::string format_indices(const idx_t_init_list &indices) const =0
Format the indices for human-readable display.
virtual idx_t get_right_halo_size(const std::string &dim) const =0
Get the right halo size in the specified dimension.
virtual double get_element(const idx_t_vec &indices) const =0
Read the value of one element in this var.
virtual idx_t_vec get_alloc_size_vec() const =0
Get the number of elements allocated in all dimensions in this var.
virtual double get_element(const idx_t_init_list &indices) const =0
Read the value of one element in this var.
virtual int get_num_domain_dims() const =0
Get the number of domain dimensions used in this var.
virtual idx_t get_right_extra_pad_size(const std::string &dim) const =0
Get the actual extra right padding in the specified dimension.
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::initializer_list< idx_t > idx_t_init_list
Initializer list of indices.
Definition yask_common_api.hpp:96
std::vector< idx_t > idx_t_vec
Vector of indices.
Definition yask_common_api.hpp:89
std::shared_ptr< yk_var > yk_var_ptr
Shared pointer to yk_var.
Definition yask_kernel_api.hpp:62
YASK_DEPRECATED typedef yk_var yk_grid
[Deprecated] Use yk_var.
Definition yask_kernel_api.hpp:299
#define YASK_DEPRECATED
Deprecated attribute.
Definition yask_common_api.hpp:60