Synchronise with Khronos-private Gitlab branch

The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
Kevin Petit
2019-02-20 16:36:05 +00:00
committed by Kévin Petit
parent 95196e7fb4
commit d8733efc0f
576 changed files with 212486 additions and 191776 deletions

View File

@@ -5,6 +5,8 @@ add_executable(conformance_test_select
../../test_common/harness/msvc9.c
../../test_common/harness/kernelHelpers.c
../../test_common/harness/errorHelpers.c
../../test_common/harness/parseParameters.cpp
../../test_common/harness/testHarness.c
)
if(CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)" AND NOT MSVC)
@@ -12,15 +14,14 @@ set_source_files_properties(
COMPILE_FLAGS -msse2)
endif()
if(WIN32)
set_source_files_properties(
test_select.c
util_select.c
../../test_common/harness/msvc9.c
../../test_common/harness/kernelHelpers.c
../../test_common/harness/errorHelpers.c
../../test_common/harness/testHarness.c
PROPERTIES LANGUAGE CXX)
endif(WIN32)
TARGET_LINK_LIBRARIES(conformance_test_select
${CLConform_LIBRARIES})

View File

@@ -1,21 +1,21 @@
project
: requirements
-<library>/harness//harness <use>/harness//harness
# <toolset>gcc:<cflags>-xc
<toolset>msvc:<cflags>"/TP"
;
exe test_select
: test_select.c
util_select.c
/harness//mt19937.c
/harness//kernelHelpers.c
/harness//errorHelpers.c
: <target-os>windows:<source>/harness//msvc9.c
;
install dist
: test_select
: <variant>debug:<location>$(DIST)/debug/tests/test_conformance/select
<variant>release:<location>$(DIST)/release/tests/test_conformance/select
;
project
: requirements
-<library>/harness//harness <use>/harness//harness
# <toolset>gcc:<cflags>-xc
<toolset>msvc:<cflags>"/TP"
;
exe test_select
: test_select.c
util_select.c
/harness//mt19937.c
/harness//kernelHelpers.c
/harness//errorHelpers.c
: <target-os>windows:<source>/harness//msvc9.c
;
install dist
: test_select
: <variant>debug:<location>$(DIST)/debug/tests/test_conformance/select
<variant>release:<location>$(DIST)/release/tests/test_conformance/select
;

View File

@@ -1,33 +1,33 @@
ifdef BUILD_WITH_ATF
ATF = -framework ATF
USE_ATF = -DUSE_ATF
endif
SRCS = test_select.c util_select.c ../../test_common/harness/mt19937.c ../../test_common/harness/kernelHelpers.c ../../test_common/harness/errorHelpers.c
LIBPATH += -L/System/Library/Frameworks/OpenCL.framework/Libraries
LIBPATH += -L.
FRAMEWORK = $(abspath $(SRCS))
HEADERS = test_select.h
TARGET = test_select
INCLUDE =
COMPILERFLAGS = -c -Wall -g -Os -Wshorten-64-to-32
CC = cc
CFLAGS = $(COMPILERFLAGS) ${RC_CFLAGS} ${USE_ATF}
LIBRARIES = -framework OpenCL ${ATF}
OBJECTS = test_select.o util_select.o mt19937.o kernelHelpers.o errorHelpers.o
TARGETOBJECT =
all: $(TARGET)
$(OBJECTS): $(FRAMEWORK) $(HEADERS)
$(CC) $(CFLAGS) $(INCLUDE) $(FRAMEWORK)
$(TARGET): $(OBJECTS)
$(CC) $(RC_CFLAGS) $(OBJECTS) -o $@ $(LIBPATH) $(LIBRARIES)
clean:
rm -f $(TARGET) $(OBJECTS)
.DEFAULT:
@echo The target \"$@\" does not exist in Makefile.
ifdef BUILD_WITH_ATF
ATF = -framework ATF
USE_ATF = -DUSE_ATF
endif
SRCS = test_select.c util_select.c ../../test_common/harness/mt19937.c ../../test_common/harness/kernelHelpers.c ../../test_common/harness/errorHelpers.c
LIBPATH += -L/System/Library/Frameworks/OpenCL.framework/Libraries
LIBPATH += -L.
FRAMEWORK = $(abspath $(SRCS))
HEADERS = test_select.h
TARGET = test_select
INCLUDE =
COMPILERFLAGS = -c -Wall -g -Os -Wshorten-64-to-32
CC = cc
CFLAGS = $(COMPILERFLAGS) ${RC_CFLAGS} ${USE_ATF}
LIBRARIES = -framework OpenCL ${ATF}
OBJECTS = test_select.o util_select.o mt19937.o kernelHelpers.o errorHelpers.o
TARGETOBJECT =
all: $(TARGET)
$(OBJECTS): $(FRAMEWORK) $(HEADERS)
$(CC) $(CFLAGS) $(INCLUDE) $(FRAMEWORK)
$(TARGET): $(OBJECTS)
$(CC) $(RC_CFLAGS) $(OBJECTS) -o $@ $(LIBPATH) $(LIBRARIES)
clean:
rm -f $(TARGET) $(OBJECTS)
.DEFAULT:
@echo The target \"$@\" does not exist in Makefile.

File diff suppressed because it is too large Load Diff

View File

@@ -1,124 +1,124 @@
//
// 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 TESTSELECTS_INCLUDED_H
#define TESTSELECTS_INCLUDED_H
#include <stdio.h>
#include <stdlib.h>
#if !defined(_WIN32)
#include <stdbool.h>
#include <stdint.h>
#endif
#include <string.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/opencl.h>
#endif
#include "../../test_common/harness/compat.h"
// Enable the test to be used with ATF
#if USE_ATF
// export BUILD_WITH_ATF=1
#include <ATF/ATF.h>
#define test_start() ATFTestStart()
#define log_info ATFLogInfo
#define log_error ATFLogError
#define test_finish() ATFTestFinish()
#else
#define test_start()
#define log_info printf
#define log_error printf
#define test_finish()
#endif // USE_ATF
// Defines the set of types we support (no support for double)
typedef enum {
kuchar = 0,
kchar = 1,
kushort = 2,
kshort = 3,
kuint = 4,
kint = 5,
kfloat = 6,
kulong = 7,
klong = 8,
kdouble = 9,
kTypeCount // always goes last
} Type;
// Support max vector size of 16
#define kVectorSizeCount 6
#define kMaxVectorSize 16
// Type names and their sizes in bytes
extern const char *type_name[kTypeCount];
extern const size_t type_size[kTypeCount];
// Associated comparison types
extern const Type ctype[kTypeCount][2];
// Reference functions for the primitive (non vector) type
typedef void (*Select)(void *dest, void *src1, void *src2, void *cmp, size_t c);
extern Select refSelects[kTypeCount][2];
// Reference functions for the primtive type but uses the vector
// definition of true and false
extern Select vrefSelects[kTypeCount][2];
// Check functions for each output type
typedef size_t (*CheckResults)(void *out1, void *out2, size_t count, size_t vectorSize);
extern CheckResults checkResults[kTypeCount];
// Helpful macros
// The next three functions check on different return values. Returns -1
// if the check failed
#define checkErr(err, msg) \
if (err != CL_SUCCESS) { \
log_error("%s failed errcode:%d\n", msg, err); \
return -1; \
}
#define checkZero(val, msg) \
if (val == 0) { \
log_error("%s failed errcode:%d\n", msg, err); \
return -1; \
}
#define checkNull(ptr, msg) \
if (!ptr) { \
log_error("%s failed\n", msg); \
return -1; \
}
// When a helper returns a negative one, we want to return from main
// with negative one. This helper prevents me from having to write
// this multiple time
#define checkHelperErr(err) \
if (err == -1) { \
return err; \
}
#endif // TESTSELECTS_INCLUDED_H
//
// 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 TESTSELECTS_INCLUDED_H
#define TESTSELECTS_INCLUDED_H
#include <stdio.h>
#include <stdlib.h>
#if !defined(_WIN32)
#include <stdbool.h>
#include <stdint.h>
#endif
#include <string.h>
#ifdef __APPLE__
#include <OpenCL/opencl.h>
#else
#include <CL/opencl.h>
#endif
#include "../../test_common/harness/compat.h"
// Enable the test to be used with ATF
#if USE_ATF
// export BUILD_WITH_ATF=1
#include <ATF/ATF.h>
#define test_start() ATFTestStart()
#define log_info ATFLogInfo
#define log_error ATFLogError
#define test_finish() ATFTestFinish()
#else
#define test_start()
#define log_info printf
#define log_error printf
#define test_finish()
#endif // USE_ATF
// Defines the set of types we support (no support for double)
typedef enum {
kuchar = 0,
kchar = 1,
kushort = 2,
kshort = 3,
kuint = 4,
kint = 5,
kfloat = 6,
kulong = 7,
klong = 8,
kdouble = 9,
kTypeCount // always goes last
} Type;
// Support max vector size of 16
#define kVectorSizeCount 6
#define kMaxVectorSize 16
// Type names and their sizes in bytes
extern const char *type_name[kTypeCount];
extern const size_t type_size[kTypeCount];
// Associated comparison types
extern const Type ctype[kTypeCount][2];
// Reference functions for the primitive (non vector) type
typedef void (*Select)(void *dest, void *src1, void *src2, void *cmp, size_t c);
extern Select refSelects[kTypeCount][2];
// Reference functions for the primtive type but uses the vector
// definition of true and false
extern Select vrefSelects[kTypeCount][2];
// Check functions for each output type
typedef size_t (*CheckResults)(void *out1, void *out2, size_t count, size_t vectorSize);
extern CheckResults checkResults[kTypeCount];
// Helpful macros
// The next three functions check on different return values. Returns -1
// if the check failed
#define checkErr(err, msg) \
if (err != CL_SUCCESS) { \
log_error("%s failed errcode:%d\n", msg, err); \
return -1; \
}
#define checkZero(val, msg) \
if (val == 0) { \
log_error("%s failed errcode:%d\n", msg, err); \
return -1; \
}
#define checkNull(ptr, msg) \
if (!ptr) { \
log_error("%s failed\n", msg); \
return -1; \
}
// When a helper returns a negative one, we want to return from main
// with negative one. This helper prevents me from having to write
// this multiple time
#define checkHelperErr(err) \
if (err == -1) { \
return err; \
}
#endif // TESTSELECTS_INCLUDED_H

File diff suppressed because it is too large Load Diff