Commit 1cb31d3e authored by BRAMAS Berenger's avatar BRAMAS Berenger

Add a CPU wrapper to the StarPU algorithm to prepare the Cuda and OpenCl ones

parent 78807cc5
This diff is collapsed.
This diff is collapsed.
#ifndef FSTARPUUTILS_HPP
#define FSTARPUUTILS_HPP
extern "C"{
#include <starpu.h>
}
#include <functional>
class FStarPUUtils{
protected:
static void ExecOnWorkersBind(void* ptr){
std::function<void(void)>* func = (std::function<void(void)>*) ptr;
(*func)();
}
public:
static void ExecOnWorkers(const unsigned int inWorkersType, std::function<void(void)> func){
starpu_execute_on_each_worker(ExecOnWorkersBind, &func, inWorkersType);
}
};
#endif // FSTARPUUTILS_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment