Mentions légales du service

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

Fix issue #253: is_gpu_mod_enabled symbol conflict with Faust package.

parent a2a8f95e
Branches
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ void enable_gpu_mod(const mxArray **prhs, const int nrhs, mxArray **plhs, const ...@@ -22,7 +22,7 @@ void enable_gpu_mod(const mxArray **prhs, const int nrhs, mxArray **plhs, const
ptr_out[0] = (double)((unsigned long long)ptr); ptr_out[0] = (double)((unsigned long long)ptr);
} }
void is_gpu_mod_enabled(const mxArray **prhs, const int nrhs, mxArray **plhs, const int nlhs) void _is_gpu_mod_enabled(const mxArray **prhs, const int nrhs, mxArray **plhs, const int nlhs)
{ {
bool enabled; bool enabled;
#ifdef USE_GPU_MOD #ifdef USE_GPU_MOD
......
#ifndef IS_GPU_MOD_ENABLED
#define IS_GPU_MOD_ENABLED
#include "faust_constant.h"
template<FDevice DEV>
void _is_gpu_mod_enabled(const mxArray **prhs, const int nrhs, mxArray **plhs, const int nlhs);
#include "is_gpu_mod_enabled.hpp"
#endif
template<FDevice DEV>
void _is_gpu_mod_enabled(const mxArray **prhs, const int nrhs, mxArray **plhs, const int nlhs)
{
bool enabled;
#ifdef USE_GPU_MOD
enabled = Faust::is_gpu_mod_enabled();
plhs[0] = mxCreateDoubleScalar(enabled);
#else
enabled = false;
plhs[0] = mxCreateDoubleScalar(enabled);
#endif
}
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
#include "faust_clone.h" #include "faust_clone.h"
#endif #endif
#include "faust_get_item.h" #include "faust_get_item.h"
#include "is_gpu_mod_enabled.h"
typedef @FAUST_SCALAR@ SCALAR; typedef @FAUST_SCALAR@ SCALAR;
typedef @FAUST_FPP@ FPP; typedef @FAUST_FPP@ FPP;
...@@ -141,7 +142,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) ...@@ -141,7 +142,7 @@ void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
// no handle commands (or at least command without second argument) // no handle commands (or at least command without second argument)
if(!strcmp("is_gpu_mod_enabled", cmd)) if(!strcmp("is_gpu_mod_enabled", cmd))
{ {
is_gpu_mod_enabled(prhs, nrhs, plhs, nlhs); _is_gpu_mod_enabled<DEV>(prhs, nrhs, plhs, nlhs);
return; return;
} }
// Check there is a second input, which should be the class instance handle // Check there is a second input, which should be the class instance handle
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment