Objet : Developers list for StarPU
Archives de la liste
- From: Gabriel Gazolla <gabrielgazolla@gmail.com>
- To: Starpu Mail List <starpu-devel@lists.gforge.inria.fr>, Starpu Team <nathalie.furmento@labri.fr>, Samuel Thibault <samuel.thibault@inria.fr>
- Subject: Re: [Starpu-devel] [SimpleHelp] Declaring and Using a Codelet in C++
- Date: Tue, 9 Jun 2015 15:00:12 -0300
- List-archive: <http://lists.gforge.inria.fr/pipermail/starpu-devel/>
- List-id: "Developers list. For discussion of new features, code changes, etc." <starpu-devel.lists.gforge.inria.fr>
Hello StarPU Team,
Just figured it out how to solve this problem, here is the answer:
===
struct starpu_codelet cl;
starpu_codelet_init(&cl);
cl.where = STARPU_CPU | STARPU_CUDA;
cl.cpu_funcs[0] = multiply_cpu; //FORGOT [0]
cl.cuda_funcs[0] = multiply_cuda; //FORGOT [0]
cl.nbuffers = 3;
cl.modes[0] = STARPU_R ;
cl.modes[1] = STARPU_R ;
cl.modes[2] = STARPU_RW;
cl.name="hello";
===
You also have to use EXTERN.
===
extern "C" void multiply_cpu (void *buffers[], void *args); //FORGOT EXTERN
extern "C" void multiply_cuda(void *buffers[], void *args); //FORGOT EXTERN
===
Hope this solution to be archived on the forum, so people can use if they have the same problem.
Best,
Joao
On Tue, Jun 9, 2015 at 2:37 PM, Gabriel Gazolla <gabrielgazolla@gmail.com> wrote:
Hello StarPU Team,I am trying to compile (build.sh) my project , but on the file matrix_spu.cpp I can't make the "struct starpu_codelet cod" to work.The idea behind it is to later on, create a vector of starpu_codelet s.I am receiving errors on lines 16 and 17.Can you please help me compile this code?Best Regards,
- [Starpu-devel] [SimpleHelp] Declaring and Using a Codelet in C++, Gabriel Gazolla, 09/06/2015
- Re: [Starpu-devel] [SimpleHelp] Declaring and Using a Codelet in C++, Gabriel Gazolla, 09/06/2015
Archives gérées par MHonArc 2.6.19+.