Skip to content

Commit

Permalink
Properly construct the parsec task
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Apr 5, 2024
1 parent 071c5bd commit 4ee6a0d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ttg/ttg/parsec/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,14 @@ namespace ttg_parsec {
: data_count(data_count)
, copies(copies)
, defer_writer(defer_writer) {
PARSEC_OBJ_CONSTRUCT(&parsec_task, parsec_task_t);
PARSEC_LIST_ITEM_SINGLETON(&parsec_task.super);
parsec_task.mempool_owner = mempool;
parsec_task.task_class = task_class;
parsec_task.priority = 0;

// TODO: can we avoid this?
for (int i = 0; i < MAX_PARAM_COUNT; ++i) { this->parsec_task.data[i].data_in = nullptr; }
// TODO: can we avoid this?
for (int i = 0; i < MAX_PARAM_COUNT; ++i) { this->parsec_task.data[i].data_in = nullptr; }
}

parsec_ttg_task_base_t(parsec_thread_mempool_t *mempool, parsec_task_class_t *task_class,
Expand All @@ -173,8 +174,8 @@ namespace ttg_parsec {
parsec_task.priority = priority;
parsec_task.chore_mask = 1<<0;

// TODO: can we avoid this?
for (int i = 0; i < MAX_PARAM_COUNT; ++i) { this->parsec_task.data[i].data_in = nullptr; }
// TODO: can we avoid this?
for (int i = 0; i < MAX_PARAM_COUNT; ++i) { this->parsec_task.data[i].data_in = nullptr; }
}

public:
Expand Down

0 comments on commit 4ee6a0d

Please sign in to comment.