Mentions légales du service

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

Refactor char2gm_Op into faust_gpu_mod_utils module.

parent e9064507
Branches
Tags
No related merge requests found
......@@ -51,7 +51,6 @@ namespace Faust
// template<typename FPP>
// MatGeneric<FPP,GPU2>* optimize(MatDense<FPP,GPU2> const & M, MatSparse<FPP,GPU2> const & S);
//
void char2gm_Op(const char& c, gm_Op & op);
}
#include "faust_MatGeneric_gpu.hpp"
#endif
......@@ -154,4 +154,16 @@ namespace Faust {
return GPUModHandler::get_singleton()->enable_gpu_mod(libpath, silent);
}
void char2gm_Op(const char& c, gm_Op & op)
{
if(c == 'N')
op = OP_NOTRANSP;
else if(c == 'T')
op = OP_TRANSP;
else if(c == 'H')
op = OP_CONJTRANSP;
else
throw std::runtime_error("invalid character to convert to gm_Op");
}
}
......@@ -85,6 +85,7 @@ namespace Faust
// easy access wrapper for the Faust namespace
void* enable_gpu_mod(const char* libpath = "libgm.so", const bool silent=false);
void char2gm_Op(const char& c, gm_Op & op);
}
#define load_all_mat_funcs(type) \
marr_funcs_##type = new gm_MatArrayFunc_##type();\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment