• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/threadTesting.h"
19 #include "harness/typeWrappers.h"
20 
21 extern int create_program_and_kernel(const char *source,
22                                      const char *kernel_name,
23                                      cl_program *program_ret,
24                                      cl_kernel *kernel_ret);
25 
26 extern int test_atomic_add(cl_device_id deviceID, cl_context context,
27                            cl_command_queue queue, int num_elements);
28 extern int test_atomic_sub(cl_device_id deviceID, cl_context context,
29                            cl_command_queue queue, int num_elements);
30 extern int test_atomic_xchg(cl_device_id deviceID, cl_context context,
31                             cl_command_queue queue, int num_elements);
32 extern int test_atomic_min(cl_device_id deviceID, cl_context context,
33                            cl_command_queue queue, int num_elements);
34 extern int test_atomic_max(cl_device_id deviceID, cl_context context,
35                            cl_command_queue queue, int num_elements);
36 extern int test_atomic_inc(cl_device_id deviceID, cl_context context,
37                            cl_command_queue queue, int num_elements);
38 extern int test_atomic_dec(cl_device_id deviceID, cl_context context,
39                            cl_command_queue queue, int num_elements);
40 extern int test_atomic_cmpxchg(cl_device_id deviceID, cl_context context,
41                                cl_command_queue queue, int num_elements);
42 extern int test_atomic_and(cl_device_id deviceID, cl_context context,
43                            cl_command_queue queue, int num_elements);
44 extern int test_atomic_or(cl_device_id deviceID, cl_context context,
45                           cl_command_queue queue, int num_elements);
46 extern int test_atomic_xor(cl_device_id deviceID, cl_context context,
47                            cl_command_queue queue, int num_elements);
48 
49 extern int test_atomic_add_index(cl_device_id deviceID, cl_context context,
50                                  cl_command_queue queue, int num_elements);
51 extern int test_atomic_add_index_bin(cl_device_id deviceID, cl_context context,
52                                      cl_command_queue queue, int num_elements);
53