GPUOcelot

LLVMKernel.h

Go to the documentation of this file.
00001 
00007 #ifndef LLVM_KERNEL_H_INCLUDED
00008 #define LLVM_KERNEL_H_INCLUDED
00009 
00010 #include <ocelot/ir/interface/Kernel.h>
00011 #include <ocelot/ir/interface/LLVMInstruction.h>
00012 #include <ocelot/ir/interface/LLVMStatement.h>
00013 
00014 namespace ir
00015 {
00016 
00018   class LLVMKernel : public Kernel
00019   {
00020     public:
00022       typedef std::vector< LLVMInstruction* > LLVMInstructionVector;
00024       typedef std::deque< LLVMStatement > LLVMStatementVector;
00025     
00026     private:
00028       std::string _code;
00030       LLVMStatementVector _statements;
00031       
00032     public:
00034       LLVMKernel();
00036       LLVMKernel( const Kernel& k );
00037     
00038     public:
00040       void push_back(const LLVMStatement& statement);
00042       void push_front(const LLVMStatement& statement);
00043     
00044     public:
00046       void assemble();
00048       bool assembled() const;
00050       const std::string& code() const;
00052       std::string numberedCode() const;
00054       const LLVMStatementVector& llvmStatements() const;
00055   };
00056 
00057 }
00058 
00059 #endif
00060 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines