ViennaCL - The Vienna Computing Library
1.5.2
|
Class for handling code generation. More...
#include <generate.hpp>
Public Types | |
typedef std::pair < expression_type, vcl_size_t > | forced_profile_key_type |
typedef of the key used in the forced profiles. Contains the expression type and the size of the scalartype More... | |
Public Member Functions | |
code_generator (viennacl::ocl::context const &ctx=viennacl::ocl::current_context()) | |
The constructor. More... | |
template<class T > | |
void | force_profile (forced_profile_key_type key, T const &t) |
Force the generator to use a specific profile for an operation. More... | |
bool | add (scheduler::statement const &statement, scheduler::statement_node const &root_node) |
Add a statement and the root node to the expression list. More... | |
void | configure_program (viennacl::ocl::program &p, std::list< viennacl::ocl::kernel * > &kernels) const |
Set the arguments for a program previously generated by the generator and fills the kernels. More... | |
void | make_program_name (char *program_name) const |
Creates an identifier string for the set of expressions in the object. More... | |
std::string | make_opencl_program_string () const |
Creates the OpenCL program string from the set of expressions in the object. More... | |
std::string | make_cuda_program_string () const |
Creates the CUDA device code from the set of expressions in the object. More... | |
Class for handling code generation.
It is meant to be only used along with the scheduler.
typedef std::pair<expression_type, vcl_size_t> forced_profile_key_type |
typedef of the key used in the forced profiles. Contains the expression type and the size of the scalartype
|
inline |
The constructor.
|
inline |
Add a statement and the root node to the expression list.
|
inline |
Set the arguments for a program previously generated by the generator and fills the kernels.
|
inline |
Force the generator to use a specific profile for an operation.
|
inline |
Creates the CUDA device code from the set of expressions in the object.
Performs just a direct translation...
|
inline |
Creates the OpenCL program string from the set of expressions in the object.
|
inline |
Creates an identifier string for the set of expressions in the object.