|
10 | 10 | #include "redGrapes/SchedulerDescription.hpp"
|
11 | 11 | #include "redGrapes/TaskFreeCtx.hpp"
|
12 | 12 | #include "redGrapes/globalSpace.hpp"
|
13 |
| -#include "redGrapes/resource/fieldresource.hpp" |
14 |
| -#include "redGrapes/resource/ioresource.hpp" |
15 | 13 | #include "redGrapes/scheduler/event.hpp"
|
16 | 14 | #include "redGrapes/scheduler/pool_scheduler.hpp"
|
17 | 15 | #include "redGrapes/task/task.hpp"
|
@@ -139,7 +137,10 @@ namespace redGrapes
|
139 | 137 |
|
140 | 138 | SPDLOG_TRACE("emplace task to worker {}", worker_id);
|
141 | 139 |
|
142 |
| - using Impl = typename std::invoke_result_t<BindArgs<Callable, Args...>, Callable, Args...>; |
| 140 | + using Impl = typename std::invoke_result_t< |
| 141 | + BindArgs<Callable, decltype(forward_arg(std::declval<Args>()))...>, |
| 142 | + Callable, |
| 143 | + decltype(forward_arg(std::declval<Args>()))...>; |
143 | 144 | // this is not set to nullptr. But it goes out of scope. Memory is managed by allocate
|
144 | 145 | FunTask<Impl, RGTask>* task;
|
145 | 146 | memory::Allocator alloc(worker_id);
|
@@ -177,30 +178,6 @@ namespace redGrapes
|
177 | 178 | return getScheduler<DefaultTag>();
|
178 | 179 | }
|
179 | 180 |
|
180 |
| - template<typename Container> |
181 |
| - auto createFieldResource(Container* c) -> FieldResource<Container> |
182 |
| - { |
183 |
| - return FieldResource<Container>(c); |
184 |
| - } |
185 |
| - |
186 |
| - template<typename Container, typename... Args> |
187 |
| - auto createFieldResource(Args&&... args) -> FieldResource<Container> |
188 |
| - { |
189 |
| - return FieldResource<Container>(std::forward<Args>(args)...); |
190 |
| - } |
191 |
| - |
192 |
| - template<typename T> |
193 |
| - auto createIOResource(std::shared_ptr<T> const& o) -> IOResource<T> |
194 |
| - { |
195 |
| - return IOResource<T>(o); |
196 |
| - } |
197 |
| - |
198 |
| - template<typename T, typename... Args> |
199 |
| - auto createIOResource(Args&&... args) -> IOResource<T> |
200 |
| - { |
201 |
| - return IOResource<T>(std::forward<Args>(args)...); |
202 |
| - } |
203 |
| - |
204 | 181 | template<typename AccessPolicy>
|
205 | 182 | auto createResource() -> Resource<AccessPolicy>
|
206 | 183 | {
|
|
0 commit comments