From 9cd5fc9843e86a79450ea4e70c469de9d113c4cd Mon Sep 17 00:00:00 2001 From: XieHan Date: Mon, 19 Oct 2020 18:45:42 +0800 Subject: [PATCH] remove some unused constructors --- src/factory/WFAlgoTaskFactory.inl | 3 ++- src/factory/WFTask.h | 11 ----------- src/factory/WFTaskFactory.h | 10 ---------- src/factory/WFTaskFactory.inl | 27 --------------------------- 4 files changed, 2 insertions(+), 49 deletions(-) diff --git a/src/factory/WFAlgoTaskFactory.inl b/src/factory/WFAlgoTaskFactory.inl index deff567b..80c8f3f8 100644 --- a/src/factory/WFAlgoTaskFactory.inl +++ b/src/factory/WFAlgoTaskFactory.inl @@ -449,9 +449,10 @@ public: algorithm::ReduceInput&& in, algorithm::reduce_function_t&& red, reduce_callback_t&& cb) : - WFReduceTask(queue, executor, std::move(in), std::move(cb)), + WFReduceTask(queue, executor, std::move(cb)), reduce(std::move(red)) { + this->in = std::move(in); } }; diff --git a/src/factory/WFTask.h b/src/factory/WFTask.h index e68f2dc2..d9c29cf8 100644 --- a/src/factory/WFTask.h +++ b/src/factory/WFTask.h @@ -109,17 +109,6 @@ public: this->error = 0; } - WFThreadTask(ExecQueue *queue, Executor *executor, INPUT&& in, - std::function *)>&& cb) : - ExecRequest(queue, executor), - input(std::move(in)), - callback(std::move(cb)) - { - this->user_data = NULL; - this->state = WFT_STATE_UNDEFINED; - this->error = 0; - } - protected: virtual ~WFThreadTask() { } }; diff --git a/src/factory/WFTaskFactory.h b/src/factory/WFTaskFactory.h index fc445ead..2951544b 100644 --- a/src/factory/WFTaskFactory.h +++ b/src/factory/WFTaskFactory.h @@ -251,11 +251,6 @@ public: std::function routine, std::function callback); - static T *create_thread_task(const std::string& queue_name, - INPUT input, - std::function routine, - std::function callback); - static MT *create_multi_thread_task(const std::string& queue_name, std::function routine, size_t nthreads, @@ -265,11 +260,6 @@ public: static T *create_thread_task(ExecQueue *queue, Executor *executor, std::function routine, std::function callback); - - static T *create_thread_task(ExecQueue *queue, Executor *executor, - INPUT input, - std::function routine, - std::function callback); }; #include "WFTaskFactory.inl" diff --git a/src/factory/WFTaskFactory.inl b/src/factory/WFTaskFactory.inl index f903f870..8d91798d 100644 --- a/src/factory/WFTaskFactory.inl +++ b/src/factory/WFTaskFactory.inl @@ -834,20 +834,6 @@ WFThreadTaskFactory::create_thread_task(const std::string& queue_ std::move(callback)); } -template -WFThreadTask * -WFThreadTaskFactory::create_thread_task(const std::string& queue_name, - INPUT input, - std::function routine, - std::function *)> callback) -{ - return new __WFThreadTask(WFGlobal::get_exec_queue(queue_name), - WFGlobal::get_compute_executor(), - std::move(input), - std::move(routine), - std::move(callback)); -} - template WFThreadTask * WFThreadTaskFactory::create_thread_task(ExecQueue *queue, Executor *executor, @@ -859,19 +845,6 @@ WFThreadTaskFactory::create_thread_task(ExecQueue *queue, Executo std::move(callback)); } -template -WFThreadTask * -WFThreadTaskFactory::create_thread_task(ExecQueue *queue, Executor *executor, - INPUT input, - std::function routine, - std::function *)> callback) -{ - return new __WFThreadTask(queue, executor, - std::move(input), - std::move(routine), - std::move(callback)); -} - template class __WFThreadTask__ : public __WFThreadTask {