mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Get rid of threadTesting.h (#1604)
It only contains a pointer type definition for test functions that really ought to be provided by testHarness.h. Signed-off-by: Kévin Petit <kpet@free.fr> Signed-off-by: Kévin Petit <kpet@free.fr>
This commit is contained in:
@@ -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()) }));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include <cassert>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include "threadTesting.h"
|
||||
#include "errorHelpers.h"
|
||||
#include "kernelHelpers.h"
|
||||
#include "fpcontrol.h"
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
#ifndef _testHarness_h
|
||||
#define _testHarness_h
|
||||
|
||||
#include "threadTesting.h"
|
||||
#include "clImageHelper.h"
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
@@ -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;
|
||||
|
||||
@@ -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 <OpenCL/opencl.h>
|
||||
#else
|
||||
#include <CL/opencl.h>
|
||||
#endif
|
||||
|
||||
typedef int (*basefn)(cl_device_id deviceID, cl_context context,
|
||||
cl_command_queue queue, int num_elements);
|
||||
|
||||
#endif // _threadTesting_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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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 <typename T> 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<test_##name##_class>(#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<unsigned char> readSPIRV(const char *file_name);
|
||||
std::vector<unsigned char> readSPIRV(const char *file_name);
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user