__device__ functions in the kernel

if i want to call __device__ type functions in the kernel in JCUDA, where should i place these functions?


You can put them into the same .cu file as the kernel.

If you are using the runtime compilation (like in this sample ), you could place them into the programSourceCode string, but note that for „real“ applications, one probably would read this string from a .cu file. The String constant is used in the sample to make it self-contained.