CLPlatform Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | CLPlatform.h |
– init
CLPlatform must be initialized with an OpenCL platform id. Use initWithPlatformId: or platforms instead of init.
- (instancetype)initDiscussion
CLPlatform must be initialized with an OpenCL platform id. Use initWithPlatformId: or platforms instead of init.
Declared In
CLPlatform.h
+ platforms
Get all currently available platforms. The set of available platforms is unlikely to change at runtime, you may want to cache the results. Will return 128 platforms at most.
+ (NSArray *)platformsReturn Value
An NSArray of CLPlatform objects.
Discussion
Get all currently available platforms. The set of available platforms is unlikely to change at runtime, you may want to cache the results. Will return 128 platforms at most.
Declared In
CLPlatform.h
+ platformWithId:
A convenience method for initWithPlatformId: that may retrieve the requested platform from an internal cache. For two CLPlatform instances a, b created by this method only [a isEqual:b] is assured, while a == b is not.
+ (instancetype)platformWithId:(cl_platform_id)platform_idParameters
platform_id |
The opaque platform identifier used by OpenCL. |
|---|
Return Value
A CLPlatform object.
Discussion
A convenience method for initWithPlatformId: that may retrieve the requested platform from an internal cache. For two CLPlatform instances a, b created by this method only [a isEqual:b] is assured, while a == b is not.
Declared In
CLPlatform.h
– initWithPlatformId:
Initializes the platform with an OpenCL opaque platform id. You should usually use [CLPlatform platforms] instead of calling this method directly. Validity of the platform id is not checked.
- (instancetype)initWithPlatformId:(cl_platform_id)platform_idParameters
platform_id |
The opaque platform identifier used by OpenCL. |
|---|
Return Value
An initialized CLPlatform object.
Discussion
Initializes the platform with an OpenCL opaque platform id. You should usually use [CLPlatform platforms] instead of calling this method directly. Validity of the platform id is not checked.
Declared In
CLPlatform.h
– devices
Get all devices available on this platform. The same hardware device may be available on multiple platforms. A new set of CLDevice instances will be created each time you call this method. Calling this method is identical to calling devicesOfType: with device type CL_DEVICE_TYPE_ALL.
- (NSArray *)devicesReturn Value
A NSArray of CLDevice objects.
Discussion
Get all devices available on this platform. The same hardware device may be available on multiple platforms. A new set of CLDevice instances will be created each time you call this method. Calling this method is identical to calling devicesOfType: with device type CL_DEVICE_TYPE_ALL.
Declared In
CLPlatform.h
– devicesOfType:
Get devices of the given type available on this platform.
- (NSArray *)devicesOfType:(cl_device_type)device_typeParameters
device_type |
The type of the devices you want returned. |
|---|
Return Value
A NSArray of CLDevice objects.
Discussion
Get devices of the given type available on this platform.
Declared In
CLPlatform.h