![]() |
ImFusion SDK 4.3
|
#include <ImFusion/CL/ClProgram.h>
OpenCL program class. More...
OpenCL program class.
Public Member Functions | |
ClProgram (std::string filename, std::string defines="", std::string buildOptions="", ClEnvironment *env=nullptr, std::unordered_map< std::string, std::string > substitutions={}) | |
Construct OpenCL program from source in filename. | |
void | setBuildOptions (const std::string &buildOptions) |
Set build options and rebuild program if necessary. | |
std::string | buildOptions () const |
bool | setDefines (const std::string &defines) |
Set defines and rebuild program if necessary. | |
std::string | defines () const |
bool | rebuild () |
Rebuild program from source file. | |
bool | isValid () const |
const ClDevice * | device () const |
int | buildStatus () const |
std::string | buildLog () const |
ClKernel * | createKernel (const std::string &name) |
std::unique_ptr< ClKernel > | createSPKernel (const std::string &name) |
std::vector< ClKernel * > | createKernels (const std::vector< std::string > &names) |
void * | program () const |
template<typename T> | |
T | getProgramBuildInfo (unsigned int name, int *ret=0) const |
template<typename T> | |
std::vector< T > | getProgramBuildInfoVector (unsigned int name, int *ret=0) const |
std::string | getAssemblyCode () const |
template<typename T> | |
T | getProgramInfo (unsigned int name, int *ret=0) const |
template<typename T> | |
std::vector< T > | getProgramInfoVector (unsigned int name, int *ret=0) const |
Protected Attributes | |
ClEnvironment * | m_env |
std::string | m_filename |
std::string | m_defines |
std::string | m_buildOptions |
std::unordered_map< std::string, std::string > | m_substitutions |
ImplData * | m_d |
bool setDefines | ( | const std::string & | defines | ) |
Set defines and rebuild program if necessary.
Returns true if a rebuild was required.