Skip to content

Commit c42c62a

Browse files
committed
Tidy
1 parent 4d19112 commit c42c62a

File tree

10 files changed

+389
-402
lines changed

10 files changed

+389
-402
lines changed

offload/liboffload/API/Enqueue.td

Lines changed: 0 additions & 68 deletions
This file was deleted.

offload/liboffload/API/Kernel.td

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,38 @@ def : Function {
2323
];
2424
let returns = [];
2525
}
26+
27+
def : Struct {
28+
let name = "ol_kernel_launch_size_args_t";
29+
let desc = "Size-related arguments for a kernel launch.";
30+
let members = [
31+
StructMember<"size_t", "Dimensions", "Number of work dimensions">,
32+
StructMember<"size_t", "NumGroupsX", "Number of work groups on the X dimension">,
33+
StructMember<"size_t", "NumGroupsY", "Number of work groups on the Y dimension">,
34+
StructMember<"size_t", "NumGroupsZ", "Number of work groups on the Z dimension">,
35+
StructMember<"size_t", "GroupSizeX", "Size of a work group on the X dimension.">,
36+
StructMember<"size_t", "GroupSizeY", "Size of a work group on the Y dimension.">,
37+
StructMember<"size_t", "GroupSizeZ", "Size of a work group on the Z dimension.">
38+
];
39+
}
40+
41+
def : Function {
42+
let name = "olLaunchKernel";
43+
let desc = "Enqueue a kernel launch with the specified size and parameters.";
44+
let details = [
45+
"If a queue is not specified, kernel execution happens synchronously"
46+
];
47+
let params = [
48+
Param<"ol_queue_handle_t", "Queue", "handle of the queue", PARAM_IN_OPTIONAL>,
49+
Param<"ol_device_handle_t", "Device", "handle of the device to execute on", PARAM_IN>,
50+
Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>,
51+
Param<"const void*", "ArgumentsData", "pointer to the kernel argument struct", PARAM_IN>,
52+
Param<"size_t", "ArgumentsSize", "size of the kernel argument struct", PARAM_IN>,
53+
Param<"const ol_kernel_launch_size_args_t*", "LaunchSizeArgs", "pointer to the struct containing launch size parameters", PARAM_IN>,
54+
Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
55+
];
56+
let returns = [
57+
Return<"OL_ERRC_INVALID_ARGUMENT", ["`Queue == NULL && EventOut != NULL`"]>,
58+
Return<"OL_ERRC_INVALID_DEVICE", ["If Queue is non-null but does not belong to Device"]>,
59+
];
60+
}

offload/liboffload/API/Memory.td

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,25 @@ def : Function {
4444
];
4545
let returns = [];
4646
}
47+
48+
def : Function {
49+
let name = "olMemcpy";
50+
let desc = "Enqueue a memcpy operation.";
51+
let details = [
52+
"For host pointers, use the device returned by olGetHostDevice",
53+
"If a queue is specified, at least one device must be a non-host device",
54+
"If a queue is not specified, the memcpy happens synchronously"
55+
];
56+
let params = [
57+
Param<"ol_queue_handle_t", "Queue", "handle of the queue.", PARAM_IN_OPTIONAL>,
58+
Param<"void*", "DstPtr", "pointer to copy to", PARAM_IN>,
59+
Param<"ol_device_handle_t", "DstDevice", "device that DstPtr belongs to", PARAM_IN>,
60+
Param<"void*", "SrcPtr", "pointer to copy from", PARAM_IN>,
61+
Param<"ol_device_handle_t", "SrcDevice", "device that SrcPtr belongs to", PARAM_IN>,
62+
Param<"size_t", "Size", "size in bytes of data to copy", PARAM_IN>,
63+
Param<"ol_event_handle_t*", "EventOut", "optional recorded event for the enqueued operation", PARAM_OUT_OPTIONAL>
64+
];
65+
let returns = [
66+
Return<"OL_ERRC_INVALID_ARGUMENT", ["`Queue == NULL && EventOut != NULL`"]>
67+
];
68+
}

offload/liboffload/API/OffloadAPI.td

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ include "Device.td"
1616
include "Memory.td"
1717
include "Queue.td"
1818
include "Event.td"
19-
include "Enqueue.td"
2019
include "Program.td"
2120
include "Kernel.td"

0 commit comments

Comments
 (0)