Bolt
1.3
C++ template library with support for OpenCL
|
#include <clcode.h>
Static Public Member Functions | |
static std::string | get () |
Bolt uses the TypeName trait to determine the string name of function object parameters when generating OpenCL(TM) code that instantiates the required templates. For example, if the user calls the Bolt transpose
library with a functor MyClass
, Bolt instantiates the transform's template function with the class MyClass
.
This is the default implementation for the TypeName trait, which must be overriden with a class specialization to return a string name of the class. The default TypeName returns an error string that causes the OpenCL(TM) kernel compilation to fail.
The BOLT_CREATE_TYPENAME is a convenience macro that helps create a TypeName trait. An example:
Note that the TypeName trait must be defined exactly once for each functor class used in a Bolt API.