mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-23 15:39:03 +00:00
Remove "C" linkages (#781)
* Remove extern C linkages * Update crc32 to cpp and remove extern C linkage
This commit is contained in:
@@ -59,9 +59,6 @@
|
||||
#define HALF_ENTRY( _name, _ulp, _embedded_ulp, _rmode, _type ) { "half_" STRINGIFY(_name), "half_" STRINGIFY(_name), {(void*)reference_##_name}, {NULL}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
#define OPERATOR_ENTRY(_name, _operator, _ulp, _embedded_ulp, _rmode, _type) { STRINGIFY(_name), _operator, {(void*)reference_##_name}, {(void*)reference_##_name##l}, {NULL}, _ulp, _ulp, _embedded_ulp, INFINITY, _rmode, RELAXED_OFF, _type }
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C" {
|
||||
#endif
|
||||
extern const vtbl _unary; // float foo( float )
|
||||
extern const vtbl _unary_u; // float foo( uint ), double foo( ulong )
|
||||
extern const vtbl _i_unary; // int foo( float )
|
||||
@@ -76,9 +73,6 @@ extern const vtbl _unary_two_results; // float foo( float, float * )
|
||||
extern const vtbl _unary_two_results_i; // float foo( float, int * )
|
||||
extern const vtbl _binary_two_results_i; // float foo( float, float, int * )
|
||||
extern const vtbl _mad_tbl; // float mad( float, float, float )
|
||||
#if defined( __cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define unaryF &_unary
|
||||
#define i_unaryF &_i_unary
|
||||
|
||||
@@ -30,10 +30,6 @@
|
||||
|
||||
#include "harness/mt19937.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef union fptr
|
||||
{
|
||||
void *p;
|
||||
@@ -97,10 +93,6 @@ extern const Func functionList[];
|
||||
|
||||
extern const size_t functionListCount;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -90,16 +90,10 @@ extern cl_device_fp_config gDoubleCapabilities;
|
||||
#define scalbnl( _a, _i ) ldexpl( _a, _i )
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
float Abs_Error( float test, double reference );
|
||||
float Ulp_Error( float test, double reference );
|
||||
//float Ulp_Error_Half( float test, double reference );
|
||||
float Bruteforce_Ulp_Error_Double( double test, long double reference );
|
||||
#ifdef __cplusplus
|
||||
} //extern "C"
|
||||
#endif
|
||||
|
||||
uint64_t GetTime( void );
|
||||
double SubtractTime( uint64_t endTime, uint64_t startTime );
|
||||
@@ -230,11 +224,7 @@ static inline void Force64BitFPUPrecision(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#else
|
||||
extern
|
||||
#endif
|
||||
void memset_pattern4(void *dest, const void *src_pattern, size_t bytes );
|
||||
|
||||
typedef union
|
||||
|
||||
@@ -28,15 +28,13 @@ int TestFunc_Double_Double_Double_common(const Func *f, MTdata, int isNextafter)
|
||||
const float twoToMinus126 = MAKE_HEX_FLOAT(0x1p-126f, 1, -126);
|
||||
const double twoToMinus1022 = MAKE_HEX_DOUBLE(0x1p-1022, 1, -1022);
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _binary = { "binary", TestFunc_Float_Float_Float, TestFunc_Double_Double_Double };
|
||||
extern const vtbl _binary = { "binary", TestFunc_Float_Float_Float,
|
||||
TestFunc_Double_Double_Double };
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _binary_nextafter = { "binary_nextafter", TestFunc_Float_Float_Float_nextafter, TestFunc_Double_Double_Double_nextafter };
|
||||
extern const vtbl _binary_nextafter = {
|
||||
"binary_nextafter", TestFunc_Float_Float_Float_nextafter,
|
||||
TestFunc_Double_Double_Double_nextafter
|
||||
};
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
|
||||
@@ -21,11 +21,9 @@
|
||||
int TestFunc_Float_Float_Float_Operator(const Func *f, MTdata);
|
||||
int TestFunc_Double_Double_Double_Operator(const Func *f, MTdata);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
|
||||
const vtbl _binary_operator = { "binaryOperator", TestFunc_Float_Float_Float_Operator, TestFunc_Double_Double_Double_Operator };
|
||||
extern const vtbl _binary_operator = { "binaryOperator",
|
||||
TestFunc_Float_Float_Float_Operator,
|
||||
TestFunc_Double_Double_Double_Operator };
|
||||
|
||||
static int BuildKernel( const char *name, const char *operator_symbol, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, const char *operator_symbol, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -22,10 +22,8 @@
|
||||
int TestFunc_Float_Float_Int(const Func *f, MTdata);
|
||||
int TestFunc_Double_Double_Int(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _binary_i = { "binary_i", TestFunc_Float_Float_Int, TestFunc_Double_Double_Int };
|
||||
extern const vtbl _binary_i = { "binary_i", TestFunc_Float_Float_Int,
|
||||
TestFunc_Double_Double_Int };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -24,10 +24,9 @@
|
||||
int TestFunc_FloatI_Float_Float(const Func *f, MTdata);
|
||||
int TestFunc_DoubleI_Double_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus )
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _binary_two_results_i = { "binary_two_results_i", TestFunc_FloatI_Float_Float, TestFunc_DoubleI_Double_Double };
|
||||
extern const vtbl _binary_two_results_i = { "binary_two_results_i",
|
||||
TestFunc_FloatI_Float_Float,
|
||||
TestFunc_DoubleI_Double_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
int TestFunc_Int_Float(const Func *f, MTdata);
|
||||
int TestFunc_Int_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _i_unary = { "i_unary", TestFunc_Int_Float, TestFunc_Int_Double };
|
||||
extern const vtbl _i_unary = { "i_unary", TestFunc_Int_Float,
|
||||
TestFunc_Int_Double };
|
||||
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
int TestMacro_Int_Float_Float(const Func *f, MTdata);
|
||||
int TestMacro_Int_Double_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _macro_binary = { "macro_binary", TestMacro_Int_Float_Float, TestMacro_Int_Double_Double };
|
||||
extern const vtbl _macro_binary = { "macro_binary", TestMacro_Int_Float_Float,
|
||||
TestMacro_Int_Double_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
int TestMacro_Int_Float(const Func *f, MTdata);
|
||||
int TestMacro_Int_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _macro_unary = { "macro_unary", TestMacro_Int_Float, TestMacro_Int_Double };
|
||||
extern const vtbl _macro_unary = { "macro_unary", TestMacro_Int_Float,
|
||||
TestMacro_Int_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,7 @@
|
||||
int TestFunc_mad(const Func *f, MTdata);
|
||||
int TestFunc_mad_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _mad_tbl = { "ternary", TestFunc_mad, TestFunc_mad_Double };
|
||||
extern const vtbl _mad_tbl = { "ternary", TestFunc_mad, TestFunc_mad_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -24,10 +24,8 @@
|
||||
int TestFunc_Float_Float_Float_Float(const Func *f, MTdata);
|
||||
int TestFunc_Double_Double_Double_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _ternary = { "ternary", TestFunc_Float_Float_Float_Float, TestFunc_Double_Double_Double_Double };
|
||||
extern const vtbl _ternary = { "ternary", TestFunc_Float_Float_Float_Float,
|
||||
TestFunc_Double_Double_Double_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -25,10 +25,8 @@
|
||||
int TestFunc_Float_Float(const Func *f, MTdata);
|
||||
int TestFunc_Double_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _unary = { "unary", TestFunc_Float_Float, TestFunc_Double_Double };
|
||||
extern const vtbl _unary = { "unary", TestFunc_Float_Float,
|
||||
TestFunc_Double_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_uint kernel_count, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,9 @@
|
||||
int TestFunc_Float2_Float(const Func *f, MTdata);
|
||||
int TestFunc_Double2_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _unary_two_results = { "unary_two_results", TestFunc_Float2_Float, TestFunc_Double2_Double };
|
||||
extern const vtbl _unary_two_results = { "unary_two_results",
|
||||
TestFunc_Float2_Float,
|
||||
TestFunc_Double2_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
int TestFunc_FloatI_Float(const Func *f, MTdata);
|
||||
int TestFunc_DoubleI_Double(const Func *f, MTdata);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _unary_two_results_i = { "unary_two_results_i", TestFunc_FloatI_Float, TestFunc_DoubleI_Double };
|
||||
extern const vtbl _unary_two_results_i = { "unary_two_results_i",
|
||||
TestFunc_FloatI_Float,
|
||||
TestFunc_DoubleI_Double };
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
static int BuildKernelDouble( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
@@ -21,10 +21,8 @@
|
||||
int TestFunc_Float_UInt(const Func *f, MTdata);
|
||||
int TestFunc_Double_ULong(const Func *f, MTdata);
|
||||
|
||||
#if defined( __cplusplus)
|
||||
extern "C"
|
||||
#endif
|
||||
const vtbl _unary_u = { "unary_u", TestFunc_Float_UInt, TestFunc_Double_ULong };
|
||||
extern const vtbl _unary_u = { "unary_u", TestFunc_Float_UInt,
|
||||
TestFunc_Double_ULong };
|
||||
|
||||
|
||||
static int BuildKernel( const char *name, int vectorSize, cl_kernel *k, cl_program *p );
|
||||
|
||||
Reference in New Issue
Block a user