This project is read-only. 1.27 and Codeproject example

Sep 10, 2014 at 9:39 PM
Edited Sep 10, 2014 at 9:40 PM

I am just trying for the first time this api.
I've tried the following example using 1.26 and it works very well

when I try to run this example in Cudafy 1.27 it fails to run properly...with messages complaining about "use Tag Struct before using struct"...

can you have a look?

thank you in advance.

Sep 11, 2014 at 5:26 PM
Are you running in opencl or cuda mode? I suspect opencl. There was a cudafy problem with opencl using structs properly, since its flavour of c expects to find the keyword struct prepending every variable declaration of a complex type, and cudafy's opencl generator isn't outputing "struct" in those cases. I'm not sure if that's been fixed in recent cudafy versions.
Sep 12, 2014 at 8:48 PM
Tks for the answer. Yes i am using OpenCL.
One of the interesting points of cudafy is exactly the possibility of using cuda, OpenCL, emulator.
Saldo at this moment i have no clube on how to fix this problem...

Any ideas?

Sep 15, 2014 at 10:34 AM
CUDAfy with OpenCL is much more limited than with CUDA. Your current issue can likely be worked around by not pointing a new variable at the parameter, but use the parameter directly.
myfunction(mystruct[] a)
   mystruct b = a[0]; // Don't do this
   b.Member += 42;  // Don't do this

   a[0].Member += 42; // Do this