Class interface for cl_platform_id.
More...
|
| Platform () |
| Default constructor - initializes to NULL.
|
|
| Platform (const cl_platform_id &platform, bool retainObject=false) |
| Constructor from cl_platform_id. More...
|
|
Platform & | operator= (const cl_platform_id &rhs) |
| Assignment operator from cl_platform_id. More...
|
|
cl_int | getInfo (cl_platform_info name, string *param) const |
| Wrapper for clGetPlatformInfo().
|
|
template<cl_int name> |
detail::param_traits< detail::cl_platform_info, name >::param_type | getInfo (cl_int *err=NULL) const |
| Wrapper for clGetPlatformInfo() that returns by value.
|
|
cl_int | getDevices (cl_device_type type, vector< Device > *devices) const |
| Gets a list of devices for this platform. More...
|
|
cl_int | unloadCompiler () |
| Wrapper for clUnloadCompiler().
|
|
| Wrapper (const cl_type &obj, bool retainObject) |
|
| Wrapper (const Wrapper< cl_type > &rhs) |
|
| Wrapper (Wrapper< cl_type > &&rhs) CL_HPP_NOEXCEPT_ |
|
Wrapper< cl_type > & | operator= (const Wrapper< cl_type > &rhs) |
|
Wrapper< cl_type > & | operator= (Wrapper< cl_type > &&rhs) |
|
Wrapper< cl_type > & | operator= (const cl_type &rhs) |
|
const cl_type & | operator() () const |
|
cl_type & | operator() () |
|
const cl_type | get () const |
|
cl_type | get () |
|
|
typedef cl_platform_id | cl_type |
|
cl_int | retain () const |
|
cl_int | release () const |
|
cl_type | object_ |
|
Class interface for cl_platform_id.
- Note
- Copies of these objects are inexpensive, since they don't 'own' any underlying resources or data structures.
- See also
- cl_platform_id
Definition at line 2194 of file cl2.hpp.
◆ Platform()
cl::Platform::Platform |
( |
const cl_platform_id & |
platform, |
|
|
bool |
retainObject = false |
|
) |
| |
|
inlineexplicit |
Constructor from cl_platform_id.
- Parameters
-
retainObject | will cause the constructor to retain its cl object. Defaults to false to maintain compatibility with earlier versions. This simply copies the platform ID value, which is an inexpensive operation. |
Definition at line 2276 of file cl2.hpp.
◆ get() [1/3]
static cl_int cl::Platform::get |
( |
vector< Platform > * |
platforms | ) |
|
|
inlinestatic |
Gets a list of available platforms.
Wraps clGetPlatformIDs().
Definition at line 2468 of file cl2.hpp.
◆ get() [2/3]
static cl_int cl::Platform::get |
( |
Platform * |
platform | ) |
|
|
inlinestatic |
Gets the first available platform.
Wraps clGetPlatformIDs(), returning the first result.
Definition at line 2503 of file cl2.hpp.
◆ get() [3/3]
static Platform cl::Platform::get |
( |
cl_int * |
errResult = NULL | ) |
|
|
inlinestatic |
Gets the first available platform, returning it by value.
- Returns
- Returns a valid platform if one is available. If no platform is available will return a null platform. Throws an exception if no platforms are available or an error condition occurs. Wraps clGetPlatformIDs(), returning the first result.
Definition at line 2522 of file cl2.hpp.
◆ getDevices()
cl_int cl::Platform::getDevices |
( |
cl_device_type |
type, |
|
|
vector< Device > * |
devices |
|
) |
| const |
|
inline |
Gets a list of devices for this platform.
Wraps clGetDeviceIDs().
Definition at line 2340 of file cl2.hpp.
◆ operator=()
Platform& cl::Platform::operator= |
( |
const cl_platform_id & |
rhs | ) |
|
|
inline |
Assignment operator from cl_platform_id.
This simply copies the platform ID value, which is an inexpensive operation.
Definition at line 2283 of file cl2.hpp.
◆ setDefault()
Modify the default platform to be used by subsequent operations. Will only set the default if no default was previously created.
- Returns
- updated default platform. Should be compared to the passed value to ensure that it was updated.
Definition at line 2307 of file cl2.hpp.
The documentation for this class was generated from the following file: