xref: /aosp_15_r20/external/OpenCL-CTS/test_conformance/events/procs.h (revision 6467f958c7de8070b317fc65bcb0f6472e388d82)
1 //
2 // Copyright (c) 2017 The Khronos Group Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 //    http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 #include "harness/errorHelpers.h"
17 #include "harness/kernelHelpers.h"
18 #include "harness/typeWrappers.h"
19 #include "harness/clImageHelper.h"
20 
21 extern float random_float(float low, float high);
22 extern float calculate_ulperror(float a, float b);
23 
24 
25 extern int test_event_get_execute_status(cl_device_id deviceID,
26                                          cl_context context,
27                                          cl_command_queue queue,
28                                          int num_elements);
29 extern int test_event_get_write_array_status(cl_device_id deviceID,
30                                              cl_context context,
31                                              cl_command_queue queue,
32                                              int num_elements);
33 extern int test_event_get_read_array_status(cl_device_id deviceID,
34                                             cl_context context,
35                                             cl_command_queue queue,
36                                             int num_elements);
37 extern int test_event_get_info(cl_device_id deviceID, cl_context context,
38                                cl_command_queue queue, int num_elements);
39 extern int test_event_wait_for_execute(cl_device_id deviceID,
40                                        cl_context context,
41                                        cl_command_queue queue,
42                                        int num_elements);
43 extern int test_event_wait_for_array(cl_device_id deviceID, cl_context context,
44                                      cl_command_queue queue, int num_elements);
45 extern int test_event_flush(cl_device_id deviceID, cl_context context,
46                             cl_command_queue queue, int num_elements);
47 extern int test_event_finish_execute(cl_device_id deviceID, cl_context context,
48                                      cl_command_queue queue, int num_elements);
49 extern int test_event_finish_array(cl_device_id deviceID, cl_context context,
50                                    cl_command_queue queue, int num_elements);
51 extern int test_event_release_before_done(cl_device_id deviceID,
52                                           cl_context context,
53                                           cl_command_queue queue,
54                                           int num_elements);
55 extern int test_event_enqueue_marker(cl_device_id deviceID, cl_context context,
56                                      cl_command_queue queue, int num_elements);
57 #ifdef CL_VERSION_1_2
58 extern int test_event_enqueue_marker_with_event_list(cl_device_id deviceID,
59                                                      cl_context context,
60                                                      cl_command_queue queue,
61                                                      int num_elements);
62 extern int test_event_enqueue_barrier_with_event_list(cl_device_id deviceID,
63                                                       cl_context context,
64                                                       cl_command_queue queue,
65                                                       int num_elements);
66 #endif
67 
68 extern int test_out_of_order_event_waitlist_single_queue(cl_device_id deviceID,
69                                                          cl_context context,
70                                                          cl_command_queue queue,
71                                                          int num_elements);
72 extern int test_out_of_order_event_waitlist_multi_queue(cl_device_id deviceID,
73                                                         cl_context context,
74                                                         cl_command_queue queue,
75                                                         int num_elements);
76 extern int test_out_of_order_event_waitlist_multi_queue_multi_device(
77     cl_device_id deviceID, cl_context context, cl_command_queue queue,
78     int num_elements);
79 
80 extern int test_out_of_order_event_enqueue_wait_for_events_single_queue(
81     cl_device_id deviceID, cl_context context, cl_command_queue queue,
82     int num_elements);
83 extern int test_out_of_order_event_enqueue_wait_for_events_multi_queue(
84     cl_device_id deviceID, cl_context context, cl_command_queue queue,
85     int num_elements);
86 extern int
87 test_out_of_order_event_enqueue_wait_for_events_multi_queue_multi_device(
88     cl_device_id deviceID, cl_context context, cl_command_queue queue,
89     int num_elements);
90 
91 extern int test_out_of_order_event_enqueue_barrier_single_queue(
92     cl_device_id deviceID, cl_context context, cl_command_queue queue,
93     int num_elements);
94 
95 extern int test_out_of_order_event_enqueue_marker_single_queue(
96     cl_device_id deviceID, cl_context context, cl_command_queue queue,
97     int num_elements);
98 extern int test_out_of_order_event_enqueue_marker_multi_queue(
99     cl_device_id deviceID, cl_context context, cl_command_queue queue,
100     int num_elements);
101 extern int test_out_of_order_event_enqueue_marker_multi_queue_multi_device(
102     cl_device_id deviceID, cl_context context, cl_command_queue queue,
103     int num_elements);
104 
105 extern int test_waitlists(cl_device_id deviceID, cl_context context,
106                           cl_command_queue queue, int num_elements);
107 extern int test_userevents(cl_device_id deviceID, cl_context context,
108                            cl_command_queue queue, int num_elements);
109 extern int test_callbacks(cl_device_id deviceID, cl_context context,
110                           cl_command_queue queue, int num_elements);
111 extern int test_callbacks_simultaneous(cl_device_id deviceID,
112                                        cl_context context,
113                                        cl_command_queue queue,
114                                        int num_elements);
115 extern int test_userevents_multithreaded(cl_device_id deviceID,
116                                          cl_context context,
117                                          cl_command_queue queue,
118                                          int num_elements);
119