Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f4c371a3 authored by hhakim's avatar hhakim
Browse files

Minor fix in enable_gpu_mod mex code to avoid a matlab error when cmake option USE_GPU_MOD is OFF.

parent 5cfe7809
Branches
Tags
No related merge requests found
...@@ -13,11 +13,12 @@ void enable_gpu_mod(const mxArray **prhs, const int nrhs, mxArray **plhs, const ...@@ -13,11 +13,12 @@ void enable_gpu_mod(const mxArray **prhs, const int nrhs, mxArray **plhs, const
mxGetString(prhs[2], backend, sizeof(backend)); mxGetString(prhs[2], backend, sizeof(backend));
silent = (bool) mxGetScalar(prhs[3]); silent = (bool) mxGetScalar(prhs[3]);
// backend is not yet used (only CUDA is available) // backend is not yet used (only CUDA is available)
void *ptr = nullptr;
#ifdef USE_GPU_MOD #ifdef USE_GPU_MOD
void* ptr = Faust::enable_gpu_mod(libpath, silent); ptr = Faust::enable_gpu_mod(libpath, silent);
#endif
plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL); plhs[0] = mxCreateDoubleMatrix(1,1,mxREAL);
double* ptr_out = (double*) mxGetData(plhs[0]); double* ptr_out = (double*) mxGetData(plhs[0]);
ptr_out[0] = (double)((unsigned long long)ptr); ptr_out[0] = (double)((unsigned long long)ptr);
#endif
} }
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment