From 4ee6a0def5c78d78317eb99a6bf7cf70d88999bc Mon Sep 17 00:00:00 2001 From: Joseph Schuchart Date: Fri, 5 Apr 2024 19:59:46 -0400 Subject: [PATCH] Properly construct the parsec task Signed-off-by: Joseph Schuchart --- ttg/ttg/parsec/task.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ttg/ttg/parsec/task.h b/ttg/ttg/parsec/task.h index d60c87f3c..7b63c1d4b 100644 --- a/ttg/ttg/parsec/task.h +++ b/ttg/ttg/parsec/task.h @@ -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, @@ -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: