Hey, I created simple function to return cos of an array in matlab. I generated this function in GPU Coder an got cuda code. I have also succesfully generated and executed executable with that function generated in GPU coder on Jetson nano. But when I try to generate same functions with same main file with cmake, executable is succesfully generated, but it returns array of zeros. However both GPU coder and CMake executables work, when the matlab functions input is scalar, instead of and array (1x100 in my case).
This is matlab function, I want CUDA from.
This is the generated CUDA function:
This is how I call it:
When I generate this on jetson with cmake with cuda 10.2. installed, output array is 0.
When I generate this on Windows PC with cmake, output array is correct.
I managed to run it on jetson in debug mode.
Variables in first breakpoint:
In breakpoint on the line 45 variables are:
Then after calling cudaMalloc variables are