• 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/compat.h"
17 
18 #if !defined(_WIN32)
19 #include <unistd.h>
20 #endif
21 
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <string.h>
25 #include "harness/testHarness.h"
26 #include "procs.h"
27 
28 test_definition test_list[] = {
29     ADD_TEST(hostptr),
30     ADD_TEST(fpmath_float),
31     ADD_TEST(fpmath_float2),
32     ADD_TEST(fpmath_float4),
33     ADD_TEST(intmath_int),
34     ADD_TEST(intmath_int2),
35     ADD_TEST(intmath_int4),
36     ADD_TEST(intmath_long),
37     ADD_TEST(intmath_long2),
38     ADD_TEST(intmath_long4),
39     ADD_TEST(hiloeo),
40     ADD_TEST(if),
41     ADD_TEST(sizeof),
42     ADD_TEST(loop),
43     ADD_TEST(pointer_cast),
44     ADD_TEST(local_arg_def),
45     ADD_TEST(local_kernel_def),
46     ADD_TEST(local_kernel_scope),
47     ADD_TEST(constant),
48     ADD_TEST(constant_source),
49     ADD_TEST(readimage),
50     ADD_TEST(readimage_int16),
51     ADD_TEST(readimage_fp32),
52     ADD_TEST(writeimage),
53     ADD_TEST(writeimage_int16),
54     ADD_TEST(writeimage_fp32),
55     ADD_TEST(mri_one),
56 
57     ADD_TEST(mri_multiple),
58     ADD_TEST(image_r8),
59     ADD_TEST(barrier),
60     ADD_TEST_VERSION(wg_barrier, Version(2, 0)),
61     ADD_TEST(int2float),
62     ADD_TEST(float2int),
63     ADD_TEST(imagereadwrite),
64     ADD_TEST(imagereadwrite3d),
65     ADD_TEST(readimage3d),
66     ADD_TEST(readimage3d_int16),
67     ADD_TEST(readimage3d_fp32),
68     ADD_TEST(bufferreadwriterect),
69     ADD_TEST(arrayreadwrite),
70     ADD_TEST(arraycopy),
71     ADD_TEST(imagearraycopy),
72     ADD_TEST(imagearraycopy3d),
73     ADD_TEST(imagecopy),
74     ADD_TEST(imagecopy3d),
75     ADD_TEST(imagerandomcopy),
76     ADD_TEST(arrayimagecopy),
77     ADD_TEST(arrayimagecopy3d),
78     ADD_TEST(imagenpot),
79 
80     ADD_TEST(vload_global),
81     ADD_TEST(vload_local),
82     ADD_TEST(vload_constant),
83     ADD_TEST(vload_private),
84     ADD_TEST(vstore_global),
85     ADD_TEST(vstore_local),
86     ADD_TEST(vstore_private),
87 
88     ADD_TEST(createkernelsinprogram),
89     ADD_TEST(imagedim_pow2),
90     ADD_TEST(imagedim_non_pow2),
91     ADD_TEST(image_param),
92     ADD_TEST(image_multipass_integer_coord),
93     ADD_TEST(image_multipass_float_coord),
94     ADD_TEST(explicit_s2v_char),
95     ADD_TEST(explicit_s2v_uchar),
96     ADD_TEST(explicit_s2v_short),
97     ADD_TEST(explicit_s2v_ushort),
98     ADD_TEST(explicit_s2v_int),
99     ADD_TEST(explicit_s2v_uint),
100     ADD_TEST(explicit_s2v_long),
101     ADD_TEST(explicit_s2v_ulong),
102     ADD_TEST(explicit_s2v_float),
103     ADD_TEST(explicit_s2v_double),
104 
105     ADD_TEST(enqueue_map_buffer),
106     ADD_TEST(enqueue_map_image),
107 
108     ADD_TEST(work_item_functions),
109 
110     ADD_TEST(astype),
111 
112     ADD_TEST(async_copy_global_to_local),
113     ADD_TEST(async_copy_local_to_global),
114     ADD_TEST(async_strided_copy_global_to_local),
115     ADD_TEST(async_strided_copy_local_to_global),
116     ADD_TEST(async_copy_global_to_local2D),
117     ADD_TEST(async_copy_local_to_global2D),
118     ADD_TEST(async_copy_global_to_local3D),
119     ADD_TEST(async_copy_local_to_global3D),
120     ADD_TEST(async_work_group_copy_fence_import_after_export_aliased_local),
121     ADD_TEST(async_work_group_copy_fence_import_after_export_aliased_global),
122     ADD_TEST(
123         async_work_group_copy_fence_import_after_export_aliased_global_and_local),
124     ADD_TEST(async_work_group_copy_fence_export_after_import_aliased_local),
125     ADD_TEST(async_work_group_copy_fence_export_after_import_aliased_global),
126     ADD_TEST(
127         async_work_group_copy_fence_export_after_import_aliased_global_and_local),
128     ADD_TEST(prefetch),
129     ADD_TEST(kernel_call_kernel_function),
130     ADD_TEST(host_numeric_constants),
131     ADD_TEST(kernel_numeric_constants),
132     ADD_TEST(kernel_limit_constants),
133     ADD_TEST(kernel_preprocessor_macros),
134     ADD_TEST(parameter_types),
135     ADD_TEST(vector_creation),
136     ADD_TEST(vector_swizzle),
137     ADD_TEST(vec_type_hint),
138     ADD_TEST(kernel_memory_alignment_local),
139     ADD_TEST(kernel_memory_alignment_global),
140     ADD_TEST(kernel_memory_alignment_constant),
141     ADD_TEST(kernel_memory_alignment_private),
142 
143     ADD_TEST_VERSION(progvar_prog_scope_misc, Version(2, 0)),
144     ADD_TEST_VERSION(progvar_prog_scope_uninit, Version(2, 0)),
145     ADD_TEST_VERSION(progvar_prog_scope_init, Version(2, 0)),
146     ADD_TEST_VERSION(progvar_func_scope, Version(2, 0)),
147 
148     ADD_TEST(global_work_offsets),
149     ADD_TEST(get_global_offset),
150 
151     ADD_TEST_VERSION(global_linear_id, Version(2, 0)),
152     ADD_TEST_VERSION(local_linear_id, Version(2, 0)),
153     ADD_TEST_VERSION(enqueued_local_size, Version(2, 0)),
154 
155     ADD_TEST(simple_read_image_pitch),
156     ADD_TEST(simple_write_image_pitch),
157 
158 #if defined( __APPLE__ )
159     ADD_TEST(queue_priority),
160 #endif
161 
162     ADD_TEST_VERSION(get_linear_ids, Version(2, 0)),
163     ADD_TEST_VERSION(rw_image_access_qualifier, Version(2, 0)),
164 };
165 
166 const int test_num = ARRAY_SIZE( test_list );
167 
main(int argc,const char * argv[])168 int main(int argc, const char *argv[])
169 {
170     return runTestHarness(argc, argv, test_num, test_list, false, 0);
171 }
172 
173