![]() |
PIP 5.6.1
Platform-Independent Primitives
|
OpenCL context wrapper that owns created programs and buffers. More...
#include <piopencl.h>
Public Member Functions | |
| ~Context () | |
| Destroys the context together with its programs and buffers. | |
| void * | handle () |
| Returns the native OpenCL context handle. | |
| void * | queue () |
| Returns the native command queue handle. | |
| Program * | createProgram (const PIString &source, const PIStringList &args=PIStringList(), PIString *error=0) |
| Builds a program from source and returns null on failure. | |
| template<typename T > | |
| Buffer * | createBuffer (PIOpenCL::Direction dir, PIVector< T > &container) |
| Creates a buffer bound to a vector container. | |
| template<typename T > | |
| Buffer * | createBuffer (PIOpenCL::Direction dir, PIDeque< T > &container) |
| Creates a buffer bound to a deque container. | |
| template<typename T > | |
| Buffer * | createBuffer (PIOpenCL::Direction dir, PIVector2D< T > &container) |
| Creates a buffer bound to a two-dimensional vector container. | |
| template<typename T > | |
| Buffer * | createBuffer (PIOpenCL::Direction dir, uint elements) |
| Creates an unbound buffer with the given element count and clears it to the default value. | |
Static Public Member Functions | |
| static Context * | create (const DeviceList &dl) |
| Creates a context for the given device list. | |
| static Context * | create (const Device &d) |
| Creates a context for a single device. | |
| static Context * | create (const PIString &part_name) |
| Creates a context for the first device whose display name contains the given text. | |
OpenCL context wrapper that owns created programs and buffers.