GPUOcelot
|
#include <Kernel.h>
Public Types | |
typedef std::vector< Parameter > | ParameterVector |
Vector of parameters. | |
typedef std::map< std::string, Parameter > | ParameterMap |
Map from names to parameters. | |
typedef std::map< std::string, Local > | LocalMap |
Map from names to local variables. | |
Public Member Functions | |
Kernel (Instruction::Architecture isa=Instruction::Unknown, const std::string &name="", bool isFunction=false, const ir::Module *module=0) | |
virtual | ~Kernel () |
Kernel (const Kernel &k) | |
Copy constructor (deep) | |
const Kernel & | operator= (const Kernel &k) |
Assignment operator (deep) | |
virtual void | write (std::ostream &stream) const |
Write this kernel to a parseable string. | |
Parameter * | getParameter (const std::string &name) |
const Parameter * | getParameter (const std::string &name) const |
void | insertParameter (const ir::Parameter ¶m, bool asParameter=true) |
bool | function () const |
Is this kernel actually a function, not a kernel? | |
Public Attributes | |
std::string | name |
Instruction::Architecture | ISA |
ParameterVector | arguments |
ParameterMap | parameters |
LocalMap | locals |
Local variables. | |
const Module * | module |
Protected Attributes | |
bool | _function |
Is this kernel a function? |
Base class for kernels
typedef std::map<std::string, Local> ir::Kernel::LocalMap |
Map from names to local variables.
typedef std::map<std::string, Parameter> ir::Kernel::ParameterMap |
Map from names to parameters.
typedef std::vector<Parameter> ir::Kernel::ParameterVector |
Vector of parameters.
ir::Kernel::Kernel | ( | Instruction::Architecture | isa = Instruction::Unknown , |
const std::string & | name = "" , |
||
bool | isFunction = false , |
||
const ir::Module * | module = 0 |
||
) |
Constructs an empty kernel
ir::Kernel::~Kernel | ( | ) | [virtual] |
Destructs kernel
ir::Kernel::Kernel | ( | const Kernel & | k | ) |
Copy constructor (deep)
bool ir::Kernel::function | ( | ) | const |
Is this kernel actually a function, not a kernel?
const ir::Parameter * ir::Kernel::getParameter | ( | const std::string & | name | ) | const |
Returns a const pointer to a parameter identified by 'name'
ir::Parameter * ir::Kernel::getParameter | ( | const std::string & | name | ) |
Returns a pointer to a parameter identified by 'name'
void ir::Kernel::insertParameter | ( | const ir::Parameter & | param, |
bool | asParameter = true |
||
) |
Inserts a parameter into the appropriate data structure
param | defines parameter to insert |
asParameter | if true, assumes this is param declaration that is not a kernel argument |
const ir::Kernel & ir::Kernel::operator= | ( | const Kernel & | k | ) |
Assignment operator (deep)
void ir::Kernel::write | ( | std::ostream & | stream | ) | const [virtual] |
Write this kernel to a parseable string.
Reimplemented in ir::PTXKernel.
bool ir::Kernel::_function [protected] |
Is this kernel a function?
Set of parameters in order specified in the kernel's definition
Instruction Set Architecture of the kernel
Local variables.
const Module* ir::Kernel::module |
Pointer to the module this kernel belongs to
std::string ir::Kernel::name |
[mangled] name of kernel within module
Set of parameters that are not kernel arguments