cuda::experimental::stf::data_instance

Defined in include/cuda/experimental/__stf/internal/task.cuh

class data_instance

Data instance implementation.

This describes an “instance” of a logical data. This is one copy on a data place. There can be multiple data instances of the same logical data on different places, or at the same places when we have access modes such as reductions.

The data instance contains everything required to keep track of the events which need to be fulfilled prior to using that copy of the data. The “state” field makes it possible to implement the MSI protocol.

Note that a data instance may correspond to a piece of data that is out of sync, but that is allocated (or not). In this case, future accesses to the logical data associated to this data instance on that data place will transfer a copy from a data instance that is valid.

Public Functions

inline data_instance()
inline data_instance(bool used, data_place dplace)
inline void set_used(bool flag)
inline bool get_used() const
inline void set_dplace(data_place _dplace)
inline const data_place &get_dplace() const
inline ::std::shared_ptr<reduction_operator_base> get_redux_op() const
inline void set_redux_op(::std::shared_ptr<reduction_operator_base> op)
inline bool is_allocated() const
inline void set_allocated(bool b)
inline reserved::msir_state_id get_msir() const
inline void set_msir(reserved::msir_state_id st)
inline const event_list &get_read_prereq() const
inline const event_list &get_write_prereq() const
inline void set_read_prereq(event_list prereq)
inline void set_write_prereq(event_list prereq)
inline void add_read_prereq(const event_list &_prereq)
inline void add_write_prereq(const event_list &_prereq)
inline void clear_read_prereq()
inline void clear_write_prereq()
inline bool has_last_task_relaxed() const
inline void set_last_task_relaxed(task t)
inline const task &get_last_task_relaxed() const
inline int max_prereq_id() const
inline size_t state_hash() const
inline void set_extra_args(void *args)
inline void *get_extra_args() const
inline void clear()

Public Members

size_t allocated_size = 0
bool reclaimable = false
bool automatically_pinned = false