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 <limits>
17
18 #include "../common.hpp"
19
20 #include "comparison_funcs.hpp"
21 #include "exponential_funcs.hpp"
22 #include "floating_point_funcs.hpp"
23 #include "half_math_funcs.hpp"
24 #include "logarithmic_funcs.hpp"
25 #include "other_funcs.hpp"
26 #include "power_funcs.hpp"
27 #include "trigonometric_funcs.hpp"
28
main(int argc,const char * argv[])29 int main(int argc, const char *argv[])
30 {
31 // Check if cl_float (float) and cl_double (double) fulfill the requirements of
32 // IEC 559 (IEEE 754) standard. This is required for the tests to run correctly.
33 if(!std::numeric_limits<cl_float>::is_iec559)
34 {
35 RETURN_ON_ERROR_MSG(-1,
36 "cl_float (float) does not fulfill the requirements of IEC 559 (IEEE 754) standard. "
37 "Tests won't run correctly."
38 );
39 }
40 if(!std::numeric_limits<cl_double>::is_iec559)
41 {
42 RETURN_ON_ERROR_MSG(-1,
43 "cl_double (double) does not fulfill the requirements of IEC 559 (IEEE 754) standard. "
44 "Tests won't run correctly."
45 );
46 }
47
48 auto& tests = autotest::test_suite::global_test_suite().test_defs;
49 return runTestHarness(argc, argv, tests.size(), tests.data(), false, false, 0);
50 }
51