| Gocl - Documentation and Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct GoclDevice; struct GoclDeviceClass; GoclQueue * gocl_device_get_default_queue (GoclDevice *self,GError **error); cl_device_id gocl_device_get_id (GoclDevice *self); gsize gocl_device_get_max_work_group_size (GoclDevice *self,GError **error); GoclDevice * gocl_queue_get_device (GoclQueue *self);
"context" GoclContext* : Read / Write / Construct Only "id" gpointer : Read / Write / Construct Only
A GoclDevice object is not normally created directly. Instead, it is
obtained from a GoclContext by calling any of gocl_context_get_device_by_index(),
gocl_context_get_default_gpu() or gocl_context_get_default_cpu().
To obtain the work group size of a device, gocl_device_get_max_work_group_size()
is used.
To enqueue operations on this device, a GoclQueue provides a default command queue
which is obtained by calling gocl_device_get_default_queue(). More device queues can
be created by passing this object as 'device' property in the GoclQueue constructor.
struct GoclDeviceClass {
GObjectClass parent_class;
};
The class for GoclDevice objects.
GObjectClass |
The parent class |
GoclQueue * gocl_device_get_default_queue (GoclDevice *self,GError **error);
Returns a GoclQueue command queue associated with this device, or NULL upon
error, in which case error is filled accordingly.
|
The GoclDevice |
|
A pointer to a GError, or NULL. [out][allow-none][transfer full]
|
Returns : |
A GoclQueue object, which is owned by the device and should not be freed. [transfer none] |
cl_device_id gocl_device_get_id (GoclDevice *self);
Returns the internal cl_device_id.
|
The GoclDevice |
Returns : |
The device id. [transfer none][type guint64] |
gsize gocl_device_get_max_work_group_size (GoclDevice *self,GError **error);
Retrieves the maximum work group size for the device,
by querying the CL_DEVICE_MAX_WORK_GROUP_SIZE info key through
clGetDeviceInfo().
Upon success a value greater than zero is returned, otherwise zero
is returned and error is filled with an error from OpenCL domain.
|
The GoclDevice |
|
A pointer to a GError, or NULL. [out][allow-none]
|
Returns : |
The maximum size of the work group for this device. |
GoclDevice * gocl_queue_get_device (GoclQueue *self);
Retrieves the device associated with this command queue.
|
The GoclQueue |
Returns : |
The GoclDevice this queue refers to. [transfer none] |
"context" property"context" GoclContext* : Read / Write / Construct Only
The context of this device.