why to use matlab in nvmex?

a silly question: to use Matlab on GPUs, we need write .cu files and compile it using nvmex. Then why wold one use Matlab, if he already knows how to write .cu in C language? Given a task, he may write a cuda program rather than matlab program to achieve it.

Actually you use the GPU from matlab. Reasons:

  1. legacy code in matlab that you want to speed up (often only small parts need to be converted)

  2. matlab is great for prototyping.

  3. visualisation of results is easy in matlab