CUDA weirdness

Just lost a few hours ripping my hair apart1. I’m currently doing some tests compiling CUDA code as object files or as a C/C++ library, in order to call it from the Dreaded Matlab. Wait a minute… did you say external Cuda lib + Matlab ? Yes, I did say that. I am aware of the existence of Matlab’s Parallel Computing Toolbox. However, two important things make me avoid it :