task.h
Go to the documentation of this file.
38 device_ptr_t m_dev_ptr = {nullptr, &m_flows[0], nullptr, nullptr}; // gpu_task will be allocated in each task
87 typedef parsec_hook_return_t (*parsec_static_op_t)(void *); // static_op will be cast to this type
135 bool defer_writer = TTG_PARSEC_DEFER_WRITER; // whether to defer writer instead of creating a new copy
136 ttg_parsec_data_flags data_flags; // HACKY: flags set by prepare_send and reset by the copy_handler
205 /* device tasks may have to store more copies than # of its inputs as their sends are aggregated */
206 static constexpr size_t num_copies = TT::derived_has_device_op() ? static_cast<size_t>(MAX_PARAM_COUNT)
218 parsec_ttg_task_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, TT *tt_ptr)
223 // We store the hash of the key and the address where it can be found in locals considered as a scratchpad
238 // We store the hash of the key and the address where it can be found in locals considered as a scratchpad
286 parsec_ttg_task_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, TT *tt_ptr)
Definition: ttg.h:1184
void release_task(task_t *task, parsec_task_t **task_ring=nullptr)
Definition: ttg.h:2653
static constexpr bool derived_has_device_op()
Definition: ttg.h:1246
uint8_t operator&(ttg_parsec_data_flags lhs, ttg_parsec_data_flags rhs)
Definition: task.h:68
parsec_hook_return_t(* parsec_static_op_t)(void *)
Definition: task.h:87
ttg_parsec_data_flags operator|=(ttg_parsec_data_flags &lhs, ttg_parsec_data_flags rhs)
Definition: task.h:61
ttg_parsec_data_flags operator&=(ttg_parsec_data_flags &lhs, ttg_parsec_data_flags rhs)
Definition: task.h:74
@ MULTIPLE_WRITER
@ MULTIPLE_READER
@ SINGLE_WRITER
@ MARKED_PUSHOUT
@ SINGLE_READER
ttg_parsec_data_flags operator|(ttg_parsec_data_flags lhs, ttg_parsec_data_flags rhs)
Definition: task.h:55
Definition: task.h:13
Definition: task.h:23
static constexpr bool support_device
Definition: task.h:24
static constexpr device_ptr_t * dev_ptr()
Definition: task.h:28
std::atomic< std::size_t > reduce_count
Definition: task.h:100
std::size_t size
Definition: task.h:98
std::size_t goal
Definition: task.h:97
parsec_lifo_t reduce_copies
Definition: task.h:99
parsec_task_t parsec_task
Definition: task.h:90
parsec_ttg_task_base_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, int data_count, ttg_data_copy_t **copies, bool defer_writer=TTG_PARSEC_DEFER_WRITER)
Definition: task.h:152
bool remove_from_hash
Definition: task.h:133
void() release_task_fn(parsec_ttg_task_base_t *)
Definition: task.h:126
void init_stream_info(TT *tt, std::array< stream_info_t, TT::numins > &streams)
Definition: task.h:121
void init_stream_info_impl(TT *tt, std::array< stream_info_t, TT::numins > &streams)
Definition: task.h:105
release_task_fn * release_task_cb
Definition: task.h:131
ttg_parsec_data_flags data_flags
Definition: task.h:136
parsec_hash_table_item_t tt_ht_item
Definition: task.h:94
parsec_ttg_task_base_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, parsec_taskpool_t *taskpool, int32_t priority, int data_count, ttg_data_copy_t **copies, release_task_fn *release_fn, bool defer_writer=TTG_PARSEC_DEFER_WRITER)
Definition: task.h:171
parsec_ttg_task_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, parsec_taskpool_t *taskpool, TT *tt_ptr, int32_t priority)
Definition: task.h:293
parsec_ttg_task_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, TT *tt_ptr)
Definition: task.h:286
device_state_t< TT::derived_has_device_op()> dev_state
Definition: task.h:282
parsec_hook_return_t invoke_op()
Definition: task.h:311
std::array< stream_info_t, num_streams > streams
Definition: task.h:277
parsec_hook_return_t invoke_evaluate()
Definition: task.h:320
static void release_task(parsec_ttg_task_base_t *task_base)
Definition: task.h:304
Definition: task.h:202
static constexpr size_t num_copies
Definition: task.h:206
parsec_hook_return_t invoke_op()
Definition: task.h:253
parsec_ttg_task_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, TT *tt_ptr)
Definition: task.h:218
std::array< stream_info_t, num_streams > streams
Definition: task.h:210
parsec_ttg_task_t(const key_type &key, parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, parsec_taskpool_t *taskpool, TT *tt_ptr, int32_t priority)
Definition: task.h:228
static constexpr size_t num_streams
Definition: task.h:204
parsec_hook_return_t invoke_evaluate()
Definition: task.h:262
device_state_t< TT::derived_has_device_op()> dev_state
Definition: task.h:215
static void release_task(parsec_ttg_task_base_t *task_base)
Definition: task.h:246
ttg_data_copy_t * copies[num_copies]
Definition: task.h:216
Definition: task.h:339
parsec_ttg_task_base_t * parent_task
Definition: task.h:340
reducer_task_t(parsec_ttg_task_base_t *task, parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class, parsec_taskpool_t *taskpool, int32_t priority, bool is_first)
Definition: task.h:343
static void release_task(parsec_ttg_task_base_t *task_base)
Definition: task.h:359