PIOpenCL native handlers, custom compile arguments
This commit is contained in:
@@ -133,10 +133,12 @@ public:
|
||||
friend class Kernel;
|
||||
public:
|
||||
~Context();
|
||||
void * handle();
|
||||
void * queue();
|
||||
static Context * create(const DeviceList & dl);
|
||||
static Context * create(const Device & d) {return create(DeviceList() << d);}
|
||||
static Context * create(const PIString & part_name);
|
||||
Program * createProgram(const PIString & source, PIString * error = 0);
|
||||
Program * createProgram(const PIString & source, const PIStringList & args = PIStringList(), PIString * error = 0);
|
||||
template <typename T> Buffer * createBuffer(PIOpenCL::Direction dir, PIVector <T> & container) {
|
||||
T def = T();
|
||||
return createBuffer(dir, &container, Buffer::cVector , PIByteArray(&def, sizeof(T)), container.size());
|
||||
@@ -173,10 +175,14 @@ public:
|
||||
friend class Kernel;
|
||||
public:
|
||||
~Buffer();
|
||||
void * handle();
|
||||
bool resize(uint new_elements);
|
||||
void clear();
|
||||
void copyToContainer();
|
||||
void copyTo(void * data);
|
||||
void copyFromContainer();
|
||||
void copyFrom(void * data);
|
||||
uint elementsCount() const {return elements;}
|
||||
private:
|
||||
enum Container {
|
||||
cNone,
|
||||
@@ -204,6 +210,7 @@ public:
|
||||
friend class Buffer;
|
||||
public:
|
||||
~Program();
|
||||
Context * context() const {return context_;}
|
||||
const PIString & sourceCode() const {return source_;}
|
||||
Kernel * kernel(int index = 0) const {return kernels_[index];}
|
||||
const PIVector<Kernel * > & kernels() const {return kernels_;}
|
||||
@@ -222,6 +229,7 @@ public:
|
||||
friend class Program;
|
||||
friend class Buffer;
|
||||
public:
|
||||
Program * program() const {return program_;}
|
||||
bool execute();
|
||||
void setExecuteRange(int size) {setExecuteRanges(PIVector<int>() << size);}
|
||||
void setExecuteRanges(const PIVector<int> & ranges);
|
||||
|
||||
Reference in New Issue
Block a user