diff --git a/test_common/autotest/test_suite.hpp b/test_common/autotest/test_suite.hpp index 3616bee4..b831b9e6 100644 --- a/test_common/autotest/test_suite.hpp +++ b/test_common/autotest/test_suite.hpp @@ -49,9 +49,11 @@ namespace detail { struct test_case_registration { - test_case_registration(const std::string& name, const basefn ptr) + test_case_registration(const std::string& name, + const test_function_pointer ptr) { - ::autotest::test_suite::global_test_suite().add(test_definition({ptr, strdup(name.c_str())})); + ::autotest::test_suite::global_test_suite().add( + test_definition({ ptr, strdup(name.c_str()) })); } }; diff --git a/test_common/gl/helpers.h b/test_common/gl/helpers.h index 084c434a..e5120f47 100644 --- a/test_common/gl/helpers.h +++ b/test_common/gl/helpers.h @@ -34,7 +34,6 @@ #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_common/gles/helpers.h b/test_common/gles/helpers.h index 20768787..69ce7d6c 100644 --- a/test_common/gles/helpers.h +++ b/test_common/gles/helpers.h @@ -37,7 +37,6 @@ #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_common/harness/testHarness.cpp b/test_common/harness/testHarness.cpp index a309f53d..b08c1c78 100644 --- a/test_common/harness/testHarness.cpp +++ b/test_common/harness/testHarness.cpp @@ -22,7 +22,6 @@ #include #include #include -#include "threadTesting.h" #include "errorHelpers.h" #include "kernelHelpers.h" #include "fpcontrol.h" diff --git a/test_common/harness/testHarness.h b/test_common/harness/testHarness.h index d6054de9..4e0529d6 100644 --- a/test_common/harness/testHarness.h +++ b/test_common/harness/testHarness.h @@ -16,7 +16,6 @@ #ifndef _testHarness_h #define _testHarness_h -#include "threadTesting.h" #include "clImageHelper.h" #include #include @@ -67,9 +66,12 @@ Version get_device_cl_version(cl_device_id device); #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) +typedef int (*test_function_pointer)(cl_device_id deviceID, cl_context context, + cl_command_queue queue, int num_elements); + typedef struct test_definition { - basefn func; + test_function_pointer func; const char *name; Version min_version; } test_definition; diff --git a/test_common/harness/threadTesting.h b/test_common/harness/threadTesting.h deleted file mode 100644 index 2f3c1873..00000000 --- a/test_common/harness/threadTesting.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// Copyright (c) 2017 The Khronos Group Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -#ifndef _threadTesting_h -#define _threadTesting_h - -#ifdef __APPLE__ -#include -#else -#include -#endif - -typedef int (*basefn)(cl_device_id deviceID, cl_context context, - cl_command_queue queue, int num_elements); - -#endif // _threadTesting_h \ No newline at end of file diff --git a/test_conformance/atomics/procs.h b/test_conformance/atomics/procs.h index fa85aad5..46bb34bd 100644 --- a/test_conformance/atomics/procs.h +++ b/test_conformance/atomics/procs.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" extern int create_program_and_kernel(const char *source, diff --git a/test_conformance/geometrics/procs.h b/test_conformance/geometrics/procs.h index 44f6f892..f9a96ff8 100644 --- a/test_conformance/geometrics/procs.h +++ b/test_conformance/geometrics/procs.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" extern int create_program_and_kernel(const char *source, const char *kernel_name, cl_program *program_ret, cl_kernel *kernel_ret); diff --git a/test_conformance/gl/testBase.h b/test_conformance/gl/testBase.h index 1ac0f50b..b6907621 100644 --- a/test_conformance/gl/testBase.h +++ b/test_conformance/gl/testBase.h @@ -34,7 +34,6 @@ #include "harness/imageHelpers.h" #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_conformance/gles/testBase.h b/test_conformance/gles/testBase.h index 09e8a836..861b8a0f 100644 --- a/test_conformance/gles/testBase.h +++ b/test_conformance/gles/testBase.h @@ -38,7 +38,6 @@ #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_conformance/integer_ops/procs.h b/test_conformance/integer_ops/procs.h index 31f6ae5f..0907938f 100644 --- a/test_conformance/integer_ops/procs.h +++ b/test_conformance/integer_ops/procs.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/testHarness.h" #include "harness/mt19937.h" diff --git a/test_conformance/mem_host_flags/testBase.h b/test_conformance/mem_host_flags/testBase.h index 54c2dcb7..bd6b30bd 100644 --- a/test_conformance/mem_host_flags/testBase.h +++ b/test_conformance/mem_host_flags/testBase.h @@ -32,7 +32,6 @@ #include "harness/imageHelpers.h" #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_conformance/relationals/procs.h b/test_conformance/relationals/procs.h index 80000ef4..25e1ab32 100644 --- a/test_conformance/relationals/procs.h +++ b/test_conformance/relationals/procs.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_conformance/spirv_new/procs.h b/test_conformance/spirv_new/procs.h index 31c65a3b..b293a520 100644 --- a/test_conformance/spirv_new/procs.h +++ b/test_conformance/spirv_new/procs.h @@ -39,7 +39,7 @@ Agreement as executed between Khronos and the recipient. class baseTestClass { public: baseTestClass() {} - virtual basefn getFunction() = 0; + virtual test_function_pointer getFunction() = 0; }; class spirvTestsRegistry { @@ -72,11 +72,11 @@ template T *createAndRegister(const char *name, Version version) cl_command_queue queue, int num_elements); \ class test_##name##_class : public baseTestClass { \ private: \ - basefn fn; \ + test_function_pointer fn; \ \ public: \ test_##name##_class(): fn(test_##name) {} \ - basefn getFunction() { return fn; } \ + test_function_pointer getFunction() { return fn; } \ }; \ test_##name##_class *var_##name = \ createAndRegister(#name, version); \ @@ -97,4 +97,4 @@ struct spec_const int get_program_with_il(clProgramWrapper &prog, const cl_device_id deviceID, const cl_context context, const char *prog_name, spec_const spec_const_def = spec_const()); -std::vector readSPIRV(const char *file_name); \ No newline at end of file +std::vector readSPIRV(const char *file_name); diff --git a/test_conformance/subgroups/procs.h b/test_conformance/subgroups/procs.h index d4f51bec..af6444c0 100644 --- a/test_conformance/subgroups/procs.h +++ b/test_conformance/subgroups/procs.h @@ -20,7 +20,6 @@ #include "harness/kernelHelpers.h" #include "harness/errorHelpers.h" #include "harness/conversions.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/mt19937.h" diff --git a/test_conformance/vectors/defines.h b/test_conformance/vectors/defines.h index c96c3dad..0ea0b00d 100644 --- a/test_conformance/vectors/defines.h +++ b/test_conformance/vectors/defines.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h" diff --git a/test_conformance/vectors/procs.h b/test_conformance/vectors/procs.h index db423a6a..7a6dba41 100644 --- a/test_conformance/vectors/procs.h +++ b/test_conformance/vectors/procs.h @@ -15,7 +15,6 @@ // #include "harness/errorHelpers.h" #include "harness/kernelHelpers.h" -#include "harness/threadTesting.h" #include "harness/typeWrappers.h" #include "harness/conversions.h" #include "harness/mt19937.h"