hello,
I use jcuda for complex computations look like this
memoryAllocation and copyFromHostToDevice
for(){
for(){
launch function 1 with parameter set 1;
launch function 2 with parameter set 2;
launch function 1 with parameter set 3;
launch function 2 with parameter set 4;
}
copyFromDeviceToHost
}
memoryFree
I always use kernelLauncher.setup(…).call(…) for function launch and it works good.
I see in http://jcuda.org/tutorial/TutorialIndex.html you use ‘cuLaunchKernel(kernelParameters)’ where ‘kernelParameters=Pointer.to(…);’
When I use cuLaunchKernel I can compile the code but the program throws ‘EXCEPTION_ACCESS_VIOLATION’ after first ‘for’ cycle.
I consider that the ‘cuLaunchKernel(kernelParameters)’ method is not suitable for my case.
Am I right?
P.S. In ‘cuLaunchKernel(kernelParameters)’ case you don’t use (as I see in tutorial) ‘memoryAllocation’ and ‘memoryCopy‘. Does it mean that ‘kernelParameters=Pointer.to(…);’ was used in this case instead of ‘memoryAllocation’ and ‘memoryCopy‘?
Thank you again!