Skip to content

Commit dfc98bd

Browse files
docs: update command queue documentation to match new type names
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
1 parent 56c57f3 commit dfc98bd

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

docs/command_queue.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
Creates a command queue on a specific device within a context. Command queues are used to schedule the execution of kernels and the transfer of data.
44
```zig
5-
pub inline fn create(
6-
context: cl_context,
7-
device: cl_device_id,
8-
properties: cl_command_queue_properties
9-
) errors.opencl_error!cl_command_queue;
5+
pub fn create(
6+
context: Context,
7+
device: DeviceId,
8+
properties: Properties,
9+
) OpenCLError!CommandQueue;
1010
```
1111

1212
**Parameters**
1313
- `context`: Must be a valid OpenCL context.
1414
- `device`: Must be a device or sub-device associated with `context`. It can either be in the list of devices and sub-devices specified when `context` is created using `clCreateContext` or be a root device with the same device type as specified when `context` is created using `clCreateContextFromType`.
15-
- `properties`: An optional list of context properties and their values. To use this, please go to the `command_queue.enums.queue_properties` enum and read the OpenCL PDF documentation about to use it.
15+
- `properties`: An optional list of context properties and their values. To use this, please go to the `Property` struct and read the OpenCL PDF documentation about to use it.
1616

1717
**Error Handling**
1818

@@ -30,18 +30,18 @@ The function uses Zig's error handling features to manage potential OpenCL error
3030
The `create_with_properties` function creates a command queue with specified properties.
3131

3232
```zig
33-
pub inline fn create_with_properties(
34-
context: cl_context,
35-
device: cl_device_id,
36-
properties: ?[]const cl_queue_properties
37-
) errors.opencl_error!cl_command_queue
33+
pub fn createWithProperties(
34+
context: Context,
35+
device: DeviceId,
36+
properties: ?[]const QueueProperties,
37+
) OpenCLError!CommandQueue;
3838
```
3939

4040
#### Parameters
4141

4242
- `context`: Specifies the OpenCL context. It must be a valid OpenCL context.
4343
- `device`: Specifies the device or sub-device associated with the context. It must be a valid device or sub-device.
44-
- `properties`: Specifies a list of properties for the command queue and their corresponding values. Each property name is immediately followed by the corresponding desired value. This list is terminated with 0. If a supported property and its value is not specified in `properties`, its default value will be used. If `properties` is `null`, default values for supported command-queue properties will be used. (To get the properties name you can use: `command_queue.enums.command_queue_properties`)
44+
- `properties`: Specifies a list of properties for the command queue and their corresponding values. Each property name is immediately followed by the corresponding desired value. This list is terminated with 0. If a supported property and its value is not specified in `properties`, its default value will be used. If `properties` is `null`, default values for supported command-queue properties will be used. (To get the properties name you can use: `QueueProperty`)
4545

4646
#### Error Handling
4747

@@ -59,7 +59,7 @@ The function uses Zig's error handling features to manage potential OpenCL error
5959
The `flush` function issues all previously queued OpenCL commands in `command_queue` to the device associated with `command_queue`.
6060

6161
```zig
62-
pub inline fn flush(command_queue: cl_command_queue) errors.opencl_error!void;
62+
pub fn flush(command_queue: CommandQueue) OpenCLError!void;
6363
```
6464

6565
#### Parameters
@@ -81,12 +81,12 @@ The function uses Zig's error handling features to manage potential OpenCL error
8181
The `finish` function ensures that all previously queued OpenCL commands in a command queue have been issued to the associated device and that all these commands have completed execution. This function blocks until the execution of all previously queued commands in the specified command queue is complete.
8282

8383
```zig
84-
pub inline fn finish(command_queue: cl_command_queue) errors.opencl_error!void;
84+
pub fn finish(command_queue: CommandQueue) OpenCLError!void;
8585
```
8686

8787
#### Parameters
8888

89-
- **command_queue**: The `cl_command_queue` for which the function waits for the completion of all previously queued commands.
89+
- **command_queue**: The `CommandQueue` for which the function waits for the completion of all previously queued commands.
9090

9191
#### Error Handling
9292

@@ -103,12 +103,12 @@ The function uses Zig's error handling features to manage potential OpenCL error
103103
The `retain` function increments the reference count of the specified command queue. This ensures that the command queue is not deleted while it is still in use.
104104

105105
```zig
106-
pub inline fn retain(command_queue: cl_command_queue) errors.opencl_error!void;
106+
pub fn retain(command_queue: CommandQueue) OpenCLError!void;
107107
```
108108

109109
### Parameters
110110

111-
- **command_queue**: The `cl_command_queue` whose reference count is to be incremented.
111+
- **command_queue**: The `CommandQueue` whose reference count is to be incremented.
112112

113113
### Error Handling
114114

@@ -125,9 +125,9 @@ The function uses Zig's error handling features to manage potential OpenCL error
125125
The `release` function decrements the reference count of the specified command queue. When the reference count reaches zero, the command queue is deleted.
126126

127127
```zig
128-
pub inline fn release(command_queue: cl_command_queue) void;
128+
pub fn release(command_queue: CommandQueue) void;
129129
```
130130

131131
### Parameters
132132

133-
- **command_queue**: The `cl_command_queue` whose reference count is to be decremented.
133+
- **command_queue**: The `CommandQueue` whose reference count is to be decremented.

0 commit comments

Comments
 (0)