diff --git a/clang/include/clang/Basic/DiagnosticSemaKinds.td b/clang/include/clang/Basic/DiagnosticSemaKinds.td --- a/clang/include/clang/Basic/DiagnosticSemaKinds.td +++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td @@ -118,7 +118,8 @@ "magnitude of floating-point constant too small for type %0; minimum is %1">, InGroup; def warn_double_const_requires_fp64 : Warning< - "double precision constant requires cl_khr_fp64, casting to single precision">; + "double precision constant requires %select{cl_khr_fp64|__opencl_c_fp64}0, " + "casting to single precision">; def err_half_const_requires_fp16 : Error< "half precision constant requires cl_khr_fp16">; @@ -9895,7 +9896,7 @@ def err_opencl_variadic_function : Error< "invalid prototype, variadic arguments are not allowed in OpenCL">; def err_opencl_requires_extension : Error< - "use of %select{type|declaration}0 %1 requires %2 extension to be enabled">; + "use of %select{type|declaration}0 %1 requires %2 %select{extension|feature}3 to be enabled">; def warn_opencl_generic_address_space_arg : Warning< "passing non-generic address space pointer to %0" " may cause dynamic conversion affecting performance">, diff --git a/clang/include/clang/Basic/OpenCLOptions.h b/clang/include/clang/Basic/OpenCLOptions.h --- a/clang/include/clang/Basic/OpenCLOptions.h +++ b/clang/include/clang/Basic/OpenCLOptions.h @@ -109,6 +109,8 @@ bool isEnabled(llvm::StringRef Ext) const; + bool isFP64Enabled(const LangOptions &LO) const; + // Is supported as either an extension or an (optional) core feature for // OpenCL version \p LO. bool isSupported(llvm::StringRef Ext, const LangOptions &LO) const; @@ -151,6 +153,9 @@ // Enable supported core and optional core features void enableSupportedCore(const LangOptions &LO); + // Is OpenCL C feature (OpenCL C 3.0, 6.2.1. Features) + bool isFeature(llvm::StringRef Ext) const; + friend class ASTWriter; friend class ASTReader; diff --git a/clang/lib/Basic/OpenCLOptions.cpp b/clang/lib/Basic/OpenCLOptions.cpp --- a/clang/lib/Basic/OpenCLOptions.cpp +++ b/clang/lib/Basic/OpenCLOptions.cpp @@ -19,6 +19,11 @@ return E != OptMap.end() && E->second.Enabled; } +bool OpenCLOptions::isFP64Enabled(const LangOptions &LO) const { + auto CLVer = LO.OpenCLCPlusPlus ? 200 : LO.OpenCLVersion; + return CLVer >= 300 ? isEnabled("__opencl_c_fp64") : isEnabled("cl_khr_fp64"); +} + bool OpenCLOptions::isSupported(llvm::StringRef Ext, const LangOptions &LO) const { auto E = OptMap.find(Ext); @@ -103,4 +108,12 @@ Opt.getValue().Enabled = true; } +bool OpenCLOptions::isFeature(llvm::StringRef Ext) const { + auto E = OptMap.find(Ext); + if (E == OptMap.end()) + return false; + return Ext.startswith("__opencl_c") && + (E->getValue().isCore() || E->getValue().isOptionalCore()); +} + } // end namespace clang diff --git a/clang/lib/Basic/TargetInfo.cpp b/clang/lib/Basic/TargetInfo.cpp --- a/clang/lib/Basic/TargetInfo.cpp +++ b/clang/lib/Basic/TargetInfo.cpp @@ -391,6 +391,14 @@ HalfFormat = &llvm::APFloat::IEEEhalf(); FloatFormat = &llvm::APFloat::IEEEsingle(); LongDoubleFormat = &llvm::APFloat::IEEEquad(); + + // Set extensions simultaneosly with correspoding features + // for OpenCL C 3.0 and higher + auto CLVer = Opts.OpenCLCPlusPlus ? 200 : Opts.OpenCLVersion; + if (CLVer >= 300) { + auto &OCLOpts = getSupportedOpenCLOpts(); + OCLOpts["cl_khr_fp64"] = OCLOpts["__opencl_c_fp64"]; + } } if (Opts.DoubleSize) { diff --git a/clang/lib/Basic/Targets/AMDGPU.h b/clang/lib/Basic/Targets/AMDGPU.h --- a/clang/lib/Basic/Targets/AMDGPU.h +++ b/clang/lib/Basic/Targets/AMDGPU.h @@ -291,6 +291,7 @@ bool IsAMDGCN = isAMDGCN(getTriple()); Opts["cl_khr_fp64"] = hasFP64(); + Opts["__opencl_c_fp64"] = hasFP64(); if (IsAMDGCN || GPUKind >= llvm::AMDGPU::GK_CEDAR) { Opts["cl_khr_byte_addressable_store"] = true; diff --git a/clang/lib/Basic/Targets/NVPTX.h b/clang/lib/Basic/Targets/NVPTX.h --- a/clang/lib/Basic/Targets/NVPTX.h +++ b/clang/lib/Basic/Targets/NVPTX.h @@ -132,6 +132,7 @@ Opts["__cl_clang_variadic_functions"] = true; Opts["cl_khr_fp64"] = true; + Opts["__opencl_c_fp64"] = true; Opts["cl_khr_byte_addressable_store"] = true; Opts["cl_khr_global_int32_base_atomics"] = true; Opts["cl_khr_global_int32_extended_atomics"] = true; diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h --- a/clang/lib/Headers/opencl-c.h +++ b/clang/lib/Headers/opencl-c.h @@ -4632,7 +4632,7 @@ // Conversions with double data type parameters or return value. -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) #pragma OPENCL EXTENSION cl_khr_fp64 : enable char __ovld __cnfn convert_char(double); char __ovld __cnfn convert_char_rte(double); @@ -5453,7 +5453,7 @@ double16 __ovld __cnfn convert_double16_rtz(uint16); double16 __ovld __cnfn convert_double16_rtz(ulong16); double16 __ovld __cnfn convert_double16_rtz(ushort16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 #pragma OPENCL EXTENSION cl_khr_fp16 : enable @@ -6272,7 +6272,7 @@ half16 __ovld __cnfn convert_half16_rtz(half16); // Convert half types to double types. -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn convert_double(half); double __ovld __cnfn convert_double_rte(half); double __ovld __cnfn convert_double_rtp(half); @@ -6335,7 +6335,7 @@ half16 __ovld __cnfn convert_half16_rtp(double16); half16 __ovld __cnfn convert_half16_rtn(double16); half16 __ovld __cnfn convert_half16_rtz(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_fp16 @@ -6406,14 +6406,14 @@ #define as_float8(x) __builtin_astype((x), float8) #define as_float16(x) __builtin_astype((x), float16) -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) #define as_double(x) __builtin_astype((x), double) #define as_double2(x) __builtin_astype((x), double2) #define as_double3(x) __builtin_astype((x), double3) #define as_double4(x) __builtin_astype((x), double4) #define as_double8(x) __builtin_astype((x), double8) #define as_double16(x) __builtin_astype((x), double16) -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 #define as_half(x) __builtin_astype((x), half) @@ -6536,14 +6536,14 @@ float4 __ovld __cnfn acos(float4); float8 __ovld __cnfn acos(float8); float16 __ovld __cnfn acos(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn acos(double); double2 __ovld __cnfn acos(double2); double3 __ovld __cnfn acos(double3); double4 __ovld __cnfn acos(double4); double8 __ovld __cnfn acos(double8); double16 __ovld __cnfn acos(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn acos(half); half2 __ovld __cnfn acos(half2); @@ -6562,14 +6562,14 @@ float4 __ovld __cnfn acosh(float4); float8 __ovld __cnfn acosh(float8); float16 __ovld __cnfn acosh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn acosh(double); double2 __ovld __cnfn acosh(double2); double3 __ovld __cnfn acosh(double3); double4 __ovld __cnfn acosh(double4); double8 __ovld __cnfn acosh(double8); double16 __ovld __cnfn acosh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn acosh(half); half2 __ovld __cnfn acosh(half2); @@ -6588,14 +6588,14 @@ float4 __ovld __cnfn acospi(float4 x); float8 __ovld __cnfn acospi(float8 x); float16 __ovld __cnfn acospi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn acospi(double x); double2 __ovld __cnfn acospi(double2 x); double3 __ovld __cnfn acospi(double3 x); double4 __ovld __cnfn acospi(double4 x); double8 __ovld __cnfn acospi(double8 x); double16 __ovld __cnfn acospi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn acospi(half x); half2 __ovld __cnfn acospi(half2 x); @@ -6614,14 +6614,14 @@ float4 __ovld __cnfn asin(float4); float8 __ovld __cnfn asin(float8); float16 __ovld __cnfn asin(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn asin(double); double2 __ovld __cnfn asin(double2); double3 __ovld __cnfn asin(double3); double4 __ovld __cnfn asin(double4); double8 __ovld __cnfn asin(double8); double16 __ovld __cnfn asin(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn asin(half); half2 __ovld __cnfn asin(half2); @@ -6640,14 +6640,14 @@ float4 __ovld __cnfn asinh(float4); float8 __ovld __cnfn asinh(float8); float16 __ovld __cnfn asinh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn asinh(double); double2 __ovld __cnfn asinh(double2); double3 __ovld __cnfn asinh(double3); double4 __ovld __cnfn asinh(double4); double8 __ovld __cnfn asinh(double8); double16 __ovld __cnfn asinh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn asinh(half); half2 __ovld __cnfn asinh(half2); @@ -6666,14 +6666,14 @@ float4 __ovld __cnfn asinpi(float4 x); float8 __ovld __cnfn asinpi(float8 x); float16 __ovld __cnfn asinpi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn asinpi(double x); double2 __ovld __cnfn asinpi(double2 x); double3 __ovld __cnfn asinpi(double3 x); double4 __ovld __cnfn asinpi(double4 x); double8 __ovld __cnfn asinpi(double8 x); double16 __ovld __cnfn asinpi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn asinpi(half x); half2 __ovld __cnfn asinpi(half2 x); @@ -6692,14 +6692,14 @@ float4 __ovld __cnfn atan(float4 y_over_x); float8 __ovld __cnfn atan(float8 y_over_x); float16 __ovld __cnfn atan(float16 y_over_x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn atan(double y_over_x); double2 __ovld __cnfn atan(double2 y_over_x); double3 __ovld __cnfn atan(double3 y_over_x); double4 __ovld __cnfn atan(double4 y_over_x); double8 __ovld __cnfn atan(double8 y_over_x); double16 __ovld __cnfn atan(double16 y_over_x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn atan(half y_over_x); half2 __ovld __cnfn atan(half2 y_over_x); @@ -6718,14 +6718,14 @@ float4 __ovld __cnfn atan2(float4 y, float4 x); float8 __ovld __cnfn atan2(float8 y, float8 x); float16 __ovld __cnfn atan2(float16 y, float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn atan2(double y, double x); double2 __ovld __cnfn atan2(double2 y, double2 x); double3 __ovld __cnfn atan2(double3 y, double3 x); double4 __ovld __cnfn atan2(double4 y, double4 x); double8 __ovld __cnfn atan2(double8 y, double8 x); double16 __ovld __cnfn atan2(double16 y, double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn atan2(half y, half x); half2 __ovld __cnfn atan2(half2 y, half2 x); @@ -6744,14 +6744,14 @@ float4 __ovld __cnfn atanh(float4); float8 __ovld __cnfn atanh(float8); float16 __ovld __cnfn atanh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn atanh(double); double2 __ovld __cnfn atanh(double2); double3 __ovld __cnfn atanh(double3); double4 __ovld __cnfn atanh(double4); double8 __ovld __cnfn atanh(double8); double16 __ovld __cnfn atanh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn atanh(half); half2 __ovld __cnfn atanh(half2); @@ -6770,14 +6770,14 @@ float4 __ovld __cnfn atanpi(float4 x); float8 __ovld __cnfn atanpi(float8 x); float16 __ovld __cnfn atanpi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn atanpi(double x); double2 __ovld __cnfn atanpi(double2 x); double3 __ovld __cnfn atanpi(double3 x); double4 __ovld __cnfn atanpi(double4 x); double8 __ovld __cnfn atanpi(double8 x); double16 __ovld __cnfn atanpi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn atanpi(half x); half2 __ovld __cnfn atanpi(half2 x); @@ -6796,14 +6796,14 @@ float4 __ovld __cnfn atan2pi(float4 y, float4 x); float8 __ovld __cnfn atan2pi(float8 y, float8 x); float16 __ovld __cnfn atan2pi(float16 y, float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn atan2pi(double y, double x); double2 __ovld __cnfn atan2pi(double2 y, double2 x); double3 __ovld __cnfn atan2pi(double3 y, double3 x); double4 __ovld __cnfn atan2pi(double4 y, double4 x); double8 __ovld __cnfn atan2pi(double8 y, double8 x); double16 __ovld __cnfn atan2pi(double16 y, double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn atan2pi(half y, half x); half2 __ovld __cnfn atan2pi(half2 y, half2 x); @@ -6822,14 +6822,14 @@ float4 __ovld __cnfn cbrt(float4); float8 __ovld __cnfn cbrt(float8); float16 __ovld __cnfn cbrt(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn cbrt(double); double2 __ovld __cnfn cbrt(double2); double3 __ovld __cnfn cbrt(double3); double4 __ovld __cnfn cbrt(double4); double8 __ovld __cnfn cbrt(double8); double16 __ovld __cnfn cbrt(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn cbrt(half); half2 __ovld __cnfn cbrt(half2); @@ -6849,14 +6849,14 @@ float4 __ovld __cnfn ceil(float4); float8 __ovld __cnfn ceil(float8); float16 __ovld __cnfn ceil(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn ceil(double); double2 __ovld __cnfn ceil(double2); double3 __ovld __cnfn ceil(double3); double4 __ovld __cnfn ceil(double4); double8 __ovld __cnfn ceil(double8); double16 __ovld __cnfn ceil(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn ceil(half); half2 __ovld __cnfn ceil(half2); @@ -6875,14 +6875,14 @@ float4 __ovld __cnfn copysign(float4 x, float4 y); float8 __ovld __cnfn copysign(float8 x, float8 y); float16 __ovld __cnfn copysign(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn copysign(double x, double y); double2 __ovld __cnfn copysign(double2 x, double2 y); double3 __ovld __cnfn copysign(double3 x, double3 y); double4 __ovld __cnfn copysign(double4 x, double4 y); double8 __ovld __cnfn copysign(double8 x, double8 y); double16 __ovld __cnfn copysign(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn copysign(half x, half y); half2 __ovld __cnfn copysign(half2 x, half2 y); @@ -6901,14 +6901,14 @@ float4 __ovld __cnfn cos(float4); float8 __ovld __cnfn cos(float8); float16 __ovld __cnfn cos(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn cos(double); double2 __ovld __cnfn cos(double2); double3 __ovld __cnfn cos(double3); double4 __ovld __cnfn cos(double4); double8 __ovld __cnfn cos(double8); double16 __ovld __cnfn cos(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn cos(half); half2 __ovld __cnfn cos(half2); @@ -6927,14 +6927,14 @@ float4 __ovld __cnfn cosh(float4); float8 __ovld __cnfn cosh(float8); float16 __ovld __cnfn cosh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn cosh(double); double2 __ovld __cnfn cosh(double2); double3 __ovld __cnfn cosh(double3); double4 __ovld __cnfn cosh(double4); double8 __ovld __cnfn cosh(double8); double16 __ovld __cnfn cosh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn cosh(half); half2 __ovld __cnfn cosh(half2); @@ -6953,14 +6953,14 @@ float4 __ovld __cnfn cospi(float4 x); float8 __ovld __cnfn cospi(float8 x); float16 __ovld __cnfn cospi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn cospi(double x); double2 __ovld __cnfn cospi(double2 x); double3 __ovld __cnfn cospi(double3 x); double4 __ovld __cnfn cospi(double4 x); double8 __ovld __cnfn cospi(double8 x); double16 __ovld __cnfn cospi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn cospi(half x); half2 __ovld __cnfn cospi(half2 x); @@ -6979,14 +6979,14 @@ float4 __ovld __cnfn erfc(float4); float8 __ovld __cnfn erfc(float8); float16 __ovld __cnfn erfc(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn erfc(double); double2 __ovld __cnfn erfc(double2); double3 __ovld __cnfn erfc(double3); double4 __ovld __cnfn erfc(double4); double8 __ovld __cnfn erfc(double8); double16 __ovld __cnfn erfc(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn erfc(half); half2 __ovld __cnfn erfc(half2); @@ -7006,14 +7006,14 @@ float4 __ovld __cnfn erf(float4); float8 __ovld __cnfn erf(float8); float16 __ovld __cnfn erf(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn erf(double); double2 __ovld __cnfn erf(double2); double3 __ovld __cnfn erf(double3); double4 __ovld __cnfn erf(double4); double8 __ovld __cnfn erf(double8); double16 __ovld __cnfn erf(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn erf(half); half2 __ovld __cnfn erf(half2); @@ -7032,14 +7032,14 @@ float4 __ovld __cnfn exp(float4 x); float8 __ovld __cnfn exp(float8 x); float16 __ovld __cnfn exp(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn exp(double x); double2 __ovld __cnfn exp(double2 x); double3 __ovld __cnfn exp(double3 x); double4 __ovld __cnfn exp(double4 x); double8 __ovld __cnfn exp(double8 x); double16 __ovld __cnfn exp(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn exp(half x); half2 __ovld __cnfn exp(half2 x); @@ -7058,14 +7058,14 @@ float4 __ovld __cnfn exp2(float4); float8 __ovld __cnfn exp2(float8); float16 __ovld __cnfn exp2(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn exp2(double); double2 __ovld __cnfn exp2(double2); double3 __ovld __cnfn exp2(double3); double4 __ovld __cnfn exp2(double4); double8 __ovld __cnfn exp2(double8); double16 __ovld __cnfn exp2(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn exp2(half); half2 __ovld __cnfn exp2(half2); @@ -7084,14 +7084,14 @@ float4 __ovld __cnfn exp10(float4); float8 __ovld __cnfn exp10(float8); float16 __ovld __cnfn exp10(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn exp10(double); double2 __ovld __cnfn exp10(double2); double3 __ovld __cnfn exp10(double3); double4 __ovld __cnfn exp10(double4); double8 __ovld __cnfn exp10(double8); double16 __ovld __cnfn exp10(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn exp10(half); half2 __ovld __cnfn exp10(half2); @@ -7110,14 +7110,14 @@ float4 __ovld __cnfn expm1(float4 x); float8 __ovld __cnfn expm1(float8 x); float16 __ovld __cnfn expm1(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn expm1(double x); double2 __ovld __cnfn expm1(double2 x); double3 __ovld __cnfn expm1(double3 x); double4 __ovld __cnfn expm1(double4 x); double8 __ovld __cnfn expm1(double8 x); double16 __ovld __cnfn expm1(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn expm1(half x); half2 __ovld __cnfn expm1(half2 x); @@ -7136,14 +7136,14 @@ float4 __ovld __cnfn fabs(float4); float8 __ovld __cnfn fabs(float8); float16 __ovld __cnfn fabs(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fabs(double); double2 __ovld __cnfn fabs(double2); double3 __ovld __cnfn fabs(double3); double4 __ovld __cnfn fabs(double4); double8 __ovld __cnfn fabs(double8); double16 __ovld __cnfn fabs(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fabs(half); half2 __ovld __cnfn fabs(half2); @@ -7162,14 +7162,14 @@ float4 __ovld __cnfn fdim(float4 x, float4 y); float8 __ovld __cnfn fdim(float8 x, float8 y); float16 __ovld __cnfn fdim(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fdim(double x, double y); double2 __ovld __cnfn fdim(double2 x, double2 y); double3 __ovld __cnfn fdim(double3 x, double3 y); double4 __ovld __cnfn fdim(double4 x, double4 y); double8 __ovld __cnfn fdim(double8 x, double8 y); double16 __ovld __cnfn fdim(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fdim(half x, half y); half2 __ovld __cnfn fdim(half2 x, half2 y); @@ -7189,14 +7189,14 @@ float4 __ovld __cnfn floor(float4); float8 __ovld __cnfn floor(float8); float16 __ovld __cnfn floor(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn floor(double); double2 __ovld __cnfn floor(double2); double3 __ovld __cnfn floor(double3); double4 __ovld __cnfn floor(double4); double8 __ovld __cnfn floor(double8); double16 __ovld __cnfn floor(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn floor(half); half2 __ovld __cnfn floor(half2); @@ -7219,14 +7219,14 @@ float4 __ovld __cnfn fma(float4 a, float4 b, float4 c); float8 __ovld __cnfn fma(float8 a, float8 b, float8 c); float16 __ovld __cnfn fma(float16 a, float16 b, float16 c); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fma(double a, double b, double c); double2 __ovld __cnfn fma(double2 a, double2 b, double2 c); double3 __ovld __cnfn fma(double3 a, double3 b, double3 c); double4 __ovld __cnfn fma(double4 a, double4 b, double4 c); double8 __ovld __cnfn fma(double8 a, double8 b, double8 c); double16 __ovld __cnfn fma(double16 a, double16 b, double16 c); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fma(half a, half b, half c); half2 __ovld __cnfn fma(half2 a, half2 b, half2 c); @@ -7253,7 +7253,7 @@ float4 __ovld __cnfn fmax(float4 x, float y); float8 __ovld __cnfn fmax(float8 x, float y); float16 __ovld __cnfn fmax(float16 x, float y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fmax(double x, double y); double2 __ovld __cnfn fmax(double2 x, double2 y); double3 __ovld __cnfn fmax(double3 x, double3 y); @@ -7265,7 +7265,7 @@ double4 __ovld __cnfn fmax(double4 x, double y); double8 __ovld __cnfn fmax(double8 x, double y); double16 __ovld __cnfn fmax(double16 x, double y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fmax(half x, half y); half2 __ovld __cnfn fmax(half2 x, half2 y); @@ -7297,7 +7297,7 @@ float4 __ovld __cnfn fmin(float4 x, float y); float8 __ovld __cnfn fmin(float8 x, float y); float16 __ovld __cnfn fmin(float16 x, float y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fmin(double x, double y); double2 __ovld __cnfn fmin(double2 x, double2 y); double3 __ovld __cnfn fmin(double3 x, double3 y); @@ -7309,7 +7309,7 @@ double4 __ovld __cnfn fmin(double4 x, double y); double8 __ovld __cnfn fmin(double8 x, double y); double16 __ovld __cnfn fmin(double16 x, double y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fmin(half x, half y); half2 __ovld __cnfn fmin(half2 x, half2 y); @@ -7333,14 +7333,14 @@ float4 __ovld __cnfn fmod(float4 x, float4 y); float8 __ovld __cnfn fmod(float8 x, float8 y); float16 __ovld __cnfn fmod(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn fmod(double x, double y); double2 __ovld __cnfn fmod(double2 x, double2 y); double3 __ovld __cnfn fmod(double3 x, double3 y); double4 __ovld __cnfn fmod(double4 x, double4 y); double8 __ovld __cnfn fmod(double8 x, double8 y); double16 __ovld __cnfn fmod(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn fmod(half x, half y); half2 __ovld __cnfn fmod(half2 x, half2 y); @@ -7361,14 +7361,14 @@ float4 __ovld fract(float4 x, float4 *iptr); float8 __ovld fract(float8 x, float8 *iptr); float16 __ovld fract(float16 x, float16 *iptr); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld fract(double x, double *iptr); double2 __ovld fract(double2 x, double2 *iptr); double3 __ovld fract(double3 x, double3 *iptr); double4 __ovld fract(double4 x, double4 *iptr); double8 __ovld fract(double8 x, double8 *iptr); double16 __ovld fract(double16 x, double16 *iptr); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld fract(half x, half *iptr); half2 __ovld fract(half2 x, half2 *iptr); @@ -7396,7 +7396,7 @@ float4 __ovld fract(float4 x, __private float4 *iptr); float8 __ovld fract(float8 x, __private float8 *iptr); float16 __ovld fract(float16 x, __private float16 *iptr); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld fract(double x, __global double *iptr); double2 __ovld fract(double2 x, __global double2 *iptr); double3 __ovld fract(double3 x, __global double3 *iptr); @@ -7415,7 +7415,7 @@ double4 __ovld fract(double4 x, __private double4 *iptr); double8 __ovld fract(double8 x, __private double8 *iptr); double16 __ovld fract(double16 x, __private double16 *iptr); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld fract(half x, __global half *iptr); half2 __ovld fract(half2 x, __global half2 *iptr); @@ -7451,14 +7451,14 @@ float4 __ovld frexp(float4 x, int4 *exp); float8 __ovld frexp(float8 x, int8 *exp); float16 __ovld frexp(float16 x, int16 *exp); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld frexp(double x, int *exp); double2 __ovld frexp(double2 x, int2 *exp); double3 __ovld frexp(double3 x, int3 *exp); double4 __ovld frexp(double4 x, int4 *exp); double8 __ovld frexp(double8 x, int8 *exp); double16 __ovld frexp(double16 x, int16 *exp); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld frexp(half x, int *exp); half2 __ovld frexp(half2 x, int2 *exp); @@ -7486,7 +7486,7 @@ float4 __ovld frexp(float4 x, __private int4 *exp); float8 __ovld frexp(float8 x, __private int8 *exp); float16 __ovld frexp(float16 x, __private int16 *exp); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld frexp(double x, __global int *exp); double2 __ovld frexp(double2 x, __global int2 *exp); double3 __ovld frexp(double3 x, __global int3 *exp); @@ -7505,7 +7505,7 @@ double4 __ovld frexp(double4 x, __private int4 *exp); double8 __ovld frexp(double8 x, __private int8 *exp); double16 __ovld frexp(double16 x, __private int16 *exp); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld frexp(half x, __global int *exp); half2 __ovld frexp(half2 x, __global int2 *exp); @@ -7538,14 +7538,14 @@ float4 __ovld __cnfn hypot(float4 x, float4 y); float8 __ovld __cnfn hypot(float8 x, float8 y); float16 __ovld __cnfn hypot(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn hypot(double x, double y); double2 __ovld __cnfn hypot(double2 x, double2 y); double3 __ovld __cnfn hypot(double3 x, double3 y); double4 __ovld __cnfn hypot(double4 x, double4 y); double8 __ovld __cnfn hypot(double8 x, double8 y); double16 __ovld __cnfn hypot(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn hypot(half x, half y); half2 __ovld __cnfn hypot(half2 x, half2 y); @@ -7564,14 +7564,14 @@ int4 __ovld __cnfn ilogb(float4 x); int8 __ovld __cnfn ilogb(float8 x); int16 __ovld __cnfn ilogb(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn ilogb(double x); int2 __ovld __cnfn ilogb(double2 x); int3 __ovld __cnfn ilogb(double3 x); int4 __ovld __cnfn ilogb(double4 x); int8 __ovld __cnfn ilogb(double8 x); int16 __ovld __cnfn ilogb(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn ilogb(half x); int2 __ovld __cnfn ilogb(half2 x); @@ -7595,7 +7595,7 @@ float4 __ovld __cnfn ldexp(float4 x, int n); float8 __ovld __cnfn ldexp(float8 x, int n); float16 __ovld __cnfn ldexp(float16 x, int n); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn ldexp(double x, int n); double2 __ovld __cnfn ldexp(double2 x, int2 n); double3 __ovld __cnfn ldexp(double3 x, int3 n); @@ -7607,7 +7607,7 @@ double4 __ovld __cnfn ldexp(double4 x, int n); double8 __ovld __cnfn ldexp(double8 x, int n); double16 __ovld __cnfn ldexp(double16 x, int n); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn ldexp(half x, int n); half2 __ovld __cnfn ldexp(half2 x, int2 n); @@ -7634,14 +7634,14 @@ float4 __ovld __cnfn lgamma(float4 x); float8 __ovld __cnfn lgamma(float8 x); float16 __ovld __cnfn lgamma(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn lgamma(double x); double2 __ovld __cnfn lgamma(double2 x); double3 __ovld __cnfn lgamma(double3 x); double4 __ovld __cnfn lgamma(double4 x); double8 __ovld __cnfn lgamma(double8 x); double16 __ovld __cnfn lgamma(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn lgamma(half x); half2 __ovld __cnfn lgamma(half2 x); @@ -7658,14 +7658,14 @@ float4 __ovld lgamma_r(float4 x, int4 *signp); float8 __ovld lgamma_r(float8 x, int8 *signp); float16 __ovld lgamma_r(float16 x, int16 *signp); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld lgamma_r(double x, int *signp); double2 __ovld lgamma_r(double2 x, int2 *signp); double3 __ovld lgamma_r(double3 x, int3 *signp); double4 __ovld lgamma_r(double4 x, int4 *signp); double8 __ovld lgamma_r(double8 x, int8 *signp); double16 __ovld lgamma_r(double16 x, int16 *signp); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld lgamma_r(half x, int *signp); half2 __ovld lgamma_r(half2 x, int2 *signp); @@ -7693,7 +7693,7 @@ float4 __ovld lgamma_r(float4 x, __private int4 *signp); float8 __ovld lgamma_r(float8 x, __private int8 *signp); float16 __ovld lgamma_r(float16 x, __private int16 *signp); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld lgamma_r(double x, __global int *signp); double2 __ovld lgamma_r(double2 x, __global int2 *signp); double3 __ovld lgamma_r(double3 x, __global int3 *signp); @@ -7712,7 +7712,7 @@ double4 __ovld lgamma_r(double4 x, __private int4 *signp); double8 __ovld lgamma_r(double8 x, __private int8 *signp); double16 __ovld lgamma_r(double16 x, __private int16 *signp); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld lgamma_r(half x, __global int *signp); half2 __ovld lgamma_r(half2 x, __global int2 *signp); @@ -7744,14 +7744,14 @@ float4 __ovld __cnfn log(float4); float8 __ovld __cnfn log(float8); float16 __ovld __cnfn log(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn log(double); double2 __ovld __cnfn log(double2); double3 __ovld __cnfn log(double3); double4 __ovld __cnfn log(double4); double8 __ovld __cnfn log(double8); double16 __ovld __cnfn log(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn log(half); half2 __ovld __cnfn log(half2); @@ -7770,14 +7770,14 @@ float4 __ovld __cnfn log2(float4); float8 __ovld __cnfn log2(float8); float16 __ovld __cnfn log2(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn log2(double); double2 __ovld __cnfn log2(double2); double3 __ovld __cnfn log2(double3); double4 __ovld __cnfn log2(double4); double8 __ovld __cnfn log2(double8); double16 __ovld __cnfn log2(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn log2(half); half2 __ovld __cnfn log2(half2); @@ -7796,14 +7796,14 @@ float4 __ovld __cnfn log10(float4); float8 __ovld __cnfn log10(float8); float16 __ovld __cnfn log10(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn log10(double); double2 __ovld __cnfn log10(double2); double3 __ovld __cnfn log10(double3); double4 __ovld __cnfn log10(double4); double8 __ovld __cnfn log10(double8); double16 __ovld __cnfn log10(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn log10(half); half2 __ovld __cnfn log10(half2); @@ -7822,14 +7822,14 @@ float4 __ovld __cnfn log1p(float4 x); float8 __ovld __cnfn log1p(float8 x); float16 __ovld __cnfn log1p(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn log1p(double x); double2 __ovld __cnfn log1p(double2 x); double3 __ovld __cnfn log1p(double3 x); double4 __ovld __cnfn log1p(double4 x); double8 __ovld __cnfn log1p(double8 x); double16 __ovld __cnfn log1p(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn log1p(half x); half2 __ovld __cnfn log1p(half2 x); @@ -7849,14 +7849,14 @@ float4 __ovld __cnfn logb(float4 x); float8 __ovld __cnfn logb(float8 x); float16 __ovld __cnfn logb(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn logb(double x); double2 __ovld __cnfn logb(double2 x); double3 __ovld __cnfn logb(double3 x); double4 __ovld __cnfn logb(double4 x); double8 __ovld __cnfn logb(double8 x); double16 __ovld __cnfn logb(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn logb(half x); half2 __ovld __cnfn logb(half2 x); @@ -7879,14 +7879,14 @@ float4 __ovld __cnfn mad(float4 a, float4 b, float4 c); float8 __ovld __cnfn mad(float8 a, float8 b, float8 c); float16 __ovld __cnfn mad(float16 a, float16 b, float16 c); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn mad(double a, double b, double c); double2 __ovld __cnfn mad(double2 a, double2 b, double2 c); double3 __ovld __cnfn mad(double3 a, double3 b, double3 c); double4 __ovld __cnfn mad(double4 a, double4 b, double4 c); double8 __ovld __cnfn mad(double8 a, double8 b, double8 c); double16 __ovld __cnfn mad(double16 a, double16 b, double16 c); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn mad(half a, half b, half c); half2 __ovld __cnfn mad(half2 a, half2 b, half2 c); @@ -7906,14 +7906,14 @@ float4 __ovld __cnfn maxmag(float4 x, float4 y); float8 __ovld __cnfn maxmag(float8 x, float8 y); float16 __ovld __cnfn maxmag(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn maxmag(double x, double y); double2 __ovld __cnfn maxmag(double2 x, double2 y); double3 __ovld __cnfn maxmag(double3 x, double3 y); double4 __ovld __cnfn maxmag(double4 x, double4 y); double8 __ovld __cnfn maxmag(double8 x, double8 y); double16 __ovld __cnfn maxmag(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn maxmag(half x, half y); half2 __ovld __cnfn maxmag(half2 x, half2 y); @@ -7933,14 +7933,14 @@ float4 __ovld __cnfn minmag(float4 x, float4 y); float8 __ovld __cnfn minmag(float8 x, float8 y); float16 __ovld __cnfn minmag(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn minmag(double x, double y); double2 __ovld __cnfn minmag(double2 x, double2 y); double3 __ovld __cnfn minmag(double3 x, double3 y); double4 __ovld __cnfn minmag(double4 x, double4 y); double8 __ovld __cnfn minmag(double8 x, double8 y); double16 __ovld __cnfn minmag(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn minmag(half x, half y); half2 __ovld __cnfn minmag(half2 x, half2 y); @@ -7964,14 +7964,14 @@ float4 __ovld modf(float4 x, float4 *iptr); float8 __ovld modf(float8 x, float8 *iptr); float16 __ovld modf(float16 x, float16 *iptr); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld modf(double x, double *iptr); double2 __ovld modf(double2 x, double2 *iptr); double3 __ovld modf(double3 x, double3 *iptr); double4 __ovld modf(double4 x, double4 *iptr); double8 __ovld modf(double8 x, double8 *iptr); double16 __ovld modf(double16 x, double16 *iptr); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld modf(half x, half *iptr); half2 __ovld modf(half2 x, half2 *iptr); @@ -7999,7 +7999,7 @@ float4 __ovld modf(float4 x, __private float4 *iptr); float8 __ovld modf(float8 x, __private float8 *iptr); float16 __ovld modf(float16 x, __private float16 *iptr); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld modf(double x, __global double *iptr); double2 __ovld modf(double2 x, __global double2 *iptr); double3 __ovld modf(double3 x, __global double3 *iptr); @@ -8018,7 +8018,7 @@ double4 __ovld modf(double4 x, __private double4 *iptr); double8 __ovld modf(double8 x, __private double8 *iptr); double16 __ovld modf(double16 x, __private double16 *iptr); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld modf(half x, __global half *iptr); half2 __ovld modf(half2 x, __global half2 *iptr); @@ -8051,14 +8051,14 @@ float4 __ovld __cnfn nan(uint4 nancode); float8 __ovld __cnfn nan(uint8 nancode); float16 __ovld __cnfn nan(uint16 nancode); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn nan(ulong nancode); double2 __ovld __cnfn nan(ulong2 nancode); double3 __ovld __cnfn nan(ulong3 nancode); double4 __ovld __cnfn nan(ulong4 nancode); double8 __ovld __cnfn nan(ulong8 nancode); double16 __ovld __cnfn nan(ulong16 nancode); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn nan(ushort nancode); half2 __ovld __cnfn nan(ushort2 nancode); @@ -8081,14 +8081,14 @@ float4 __ovld __cnfn nextafter(float4 x, float4 y); float8 __ovld __cnfn nextafter(float8 x, float8 y); float16 __ovld __cnfn nextafter(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn nextafter(double x, double y); double2 __ovld __cnfn nextafter(double2 x, double2 y); double3 __ovld __cnfn nextafter(double3 x, double3 y); double4 __ovld __cnfn nextafter(double4 x, double4 y); double8 __ovld __cnfn nextafter(double8 x, double8 y); double16 __ovld __cnfn nextafter(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn nextafter(half x, half y); half2 __ovld __cnfn nextafter(half2 x, half2 y); @@ -8107,14 +8107,14 @@ float4 __ovld __cnfn pow(float4 x, float4 y); float8 __ovld __cnfn pow(float8 x, float8 y); float16 __ovld __cnfn pow(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn pow(double x, double y); double2 __ovld __cnfn pow(double2 x, double2 y); double3 __ovld __cnfn pow(double3 x, double3 y); double4 __ovld __cnfn pow(double4 x, double4 y); double8 __ovld __cnfn pow(double8 x, double8 y); double16 __ovld __cnfn pow(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn pow(half x, half y); half2 __ovld __cnfn pow(half2 x, half2 y); @@ -8133,14 +8133,14 @@ float4 __ovld __cnfn pown(float4 x, int4 y); float8 __ovld __cnfn pown(float8 x, int8 y); float16 __ovld __cnfn pown(float16 x, int16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn pown(double x, int y); double2 __ovld __cnfn pown(double2 x, int2 y); double3 __ovld __cnfn pown(double3 x, int3 y); double4 __ovld __cnfn pown(double4 x, int4 y); double8 __ovld __cnfn pown(double8 x, int8 y); double16 __ovld __cnfn pown(double16 x, int16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn pown(half x, int y); half2 __ovld __cnfn pown(half2 x, int2 y); @@ -8159,14 +8159,14 @@ float4 __ovld __cnfn powr(float4 x, float4 y); float8 __ovld __cnfn powr(float8 x, float8 y); float16 __ovld __cnfn powr(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn powr(double x, double y); double2 __ovld __cnfn powr(double2 x, double2 y); double3 __ovld __cnfn powr(double3 x, double3 y); double4 __ovld __cnfn powr(double4 x, double4 y); double8 __ovld __cnfn powr(double8 x, double8 y); double16 __ovld __cnfn powr(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn powr(half x, half y); half2 __ovld __cnfn powr(half2 x, half2 y); @@ -8188,14 +8188,14 @@ float4 __ovld __cnfn remainder(float4 x, float4 y); float8 __ovld __cnfn remainder(float8 x, float8 y); float16 __ovld __cnfn remainder(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn remainder(double x, double y); double2 __ovld __cnfn remainder(double2 x, double2 y); double3 __ovld __cnfn remainder(double3 x, double3 y); double4 __ovld __cnfn remainder(double4 x, double4 y); double8 __ovld __cnfn remainder(double8 x, double8 y); double16 __ovld __cnfn remainder(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn remainder(half x, half y); half2 __ovld __cnfn remainder(half2 x, half2 y); @@ -8224,14 +8224,14 @@ float4 __ovld remquo(float4 x, float4 y, int4 *quo); float8 __ovld remquo(float8 x, float8 y, int8 *quo); float16 __ovld remquo(float16 x, float16 y, int16 *quo); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld remquo(double x, double y, int *quo); double2 __ovld remquo(double2 x, double2 y, int2 *quo); double3 __ovld remquo(double3 x, double3 y, int3 *quo); double4 __ovld remquo(double4 x, double4 y, int4 *quo); double8 __ovld remquo(double8 x, double8 y, int8 *quo); double16 __ovld remquo(double16 x, double16 y, int16 *quo); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld remquo(half x, half y, int *quo); half2 __ovld remquo(half2 x, half2 y, int2 *quo); @@ -8260,7 +8260,7 @@ float4 __ovld remquo(float4 x, float4 y, __private int4 *quo); float8 __ovld remquo(float8 x, float8 y, __private int8 *quo); float16 __ovld remquo(float16 x, float16 y, __private int16 *quo); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld remquo(double x, double y, __global int *quo); double2 __ovld remquo(double2 x, double2 y, __global int2 *quo); double3 __ovld remquo(double3 x, double3 y, __global int3 *quo); @@ -8279,7 +8279,7 @@ double4 __ovld remquo(double4 x, double4 y, __private int4 *quo); double8 __ovld remquo(double8 x, double8 y, __private int8 *quo); double16 __ovld remquo(double16 x, double16 y, __private int16 *quo); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld remquo(half x, half y, __global int *quo); half2 __ovld remquo(half2 x, half2 y, __global int2 *quo); @@ -8313,14 +8313,14 @@ float4 __ovld __cnfn rint(float4); float8 __ovld __cnfn rint(float8); float16 __ovld __cnfn rint(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn rint(double); double2 __ovld __cnfn rint(double2); double3 __ovld __cnfn rint(double3); double4 __ovld __cnfn rint(double4); double8 __ovld __cnfn rint(double8); double16 __ovld __cnfn rint(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn rint(half); half2 __ovld __cnfn rint(half2); @@ -8339,14 +8339,14 @@ float4 __ovld __cnfn rootn(float4 x, int4 y); float8 __ovld __cnfn rootn(float8 x, int8 y); float16 __ovld __cnfn rootn(float16 x, int16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn rootn(double x, int y); double2 __ovld __cnfn rootn(double2 x, int2 y); double3 __ovld __cnfn rootn(double3 x, int3 y); double4 __ovld __cnfn rootn(double4 x, int4 y); double8 __ovld __cnfn rootn(double8 x, int8 y); double16 __ovld __cnfn rootn(double16 x, int16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn rootn(half x, int y); half2 __ovld __cnfn rootn(half2 x, int2 y); @@ -8367,14 +8367,14 @@ float4 __ovld __cnfn round(float4 x); float8 __ovld __cnfn round(float8 x); float16 __ovld __cnfn round(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn round(double x); double2 __ovld __cnfn round(double2 x); double3 __ovld __cnfn round(double3 x); double4 __ovld __cnfn round(double4 x); double8 __ovld __cnfn round(double8 x); double16 __ovld __cnfn round(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn round(half x); half2 __ovld __cnfn round(half2 x); @@ -8393,14 +8393,14 @@ float4 __ovld __cnfn rsqrt(float4); float8 __ovld __cnfn rsqrt(float8); float16 __ovld __cnfn rsqrt(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn rsqrt(double); double2 __ovld __cnfn rsqrt(double2); double3 __ovld __cnfn rsqrt(double3); double4 __ovld __cnfn rsqrt(double4); double8 __ovld __cnfn rsqrt(double8); double16 __ovld __cnfn rsqrt(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn rsqrt(half); half2 __ovld __cnfn rsqrt(half2); @@ -8419,14 +8419,14 @@ float4 __ovld __cnfn sin(float4); float8 __ovld __cnfn sin(float8); float16 __ovld __cnfn sin(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn sin(double); double2 __ovld __cnfn sin(double2); double3 __ovld __cnfn sin(double3); double4 __ovld __cnfn sin(double4); double8 __ovld __cnfn sin(double8); double16 __ovld __cnfn sin(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn sin(half); half2 __ovld __cnfn sin(half2); @@ -8448,14 +8448,14 @@ float4 __ovld sincos(float4 x, float4 *cosval); float8 __ovld sincos(float8 x, float8 *cosval); float16 __ovld sincos(float16 x, float16 *cosval); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sincos(double x, double *cosval); double2 __ovld sincos(double2 x, double2 *cosval); double3 __ovld sincos(double3 x, double3 *cosval); double4 __ovld sincos(double4 x, double4 *cosval); double8 __ovld sincos(double8 x, double8 *cosval); double16 __ovld sincos(double16 x, double16 *cosval); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld sincos(half x, half *cosval); half2 __ovld sincos(half2 x, half2 *cosval); @@ -8483,7 +8483,7 @@ float4 __ovld sincos(float4 x, __private float4 *cosval); float8 __ovld sincos(float8 x, __private float8 *cosval); float16 __ovld sincos(float16 x, __private float16 *cosval); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sincos(double x, __global double *cosval); double2 __ovld sincos(double2 x, __global double2 *cosval); double3 __ovld sincos(double3 x, __global double3 *cosval); @@ -8502,7 +8502,7 @@ double4 __ovld sincos(double4 x, __private double4 *cosval); double8 __ovld sincos(double8 x, __private double8 *cosval); double16 __ovld sincos(double16 x, __private double16 *cosval); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld sincos(half x, __global half *cosval); half2 __ovld sincos(half2 x, __global half2 *cosval); @@ -8534,14 +8534,14 @@ float4 __ovld __cnfn sinh(float4); float8 __ovld __cnfn sinh(float8); float16 __ovld __cnfn sinh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn sinh(double); double2 __ovld __cnfn sinh(double2); double3 __ovld __cnfn sinh(double3); double4 __ovld __cnfn sinh(double4); double8 __ovld __cnfn sinh(double8); double16 __ovld __cnfn sinh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn sinh(half); half2 __ovld __cnfn sinh(half2); @@ -8560,14 +8560,14 @@ float4 __ovld __cnfn sinpi(float4 x); float8 __ovld __cnfn sinpi(float8 x); float16 __ovld __cnfn sinpi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn sinpi(double x); double2 __ovld __cnfn sinpi(double2 x); double3 __ovld __cnfn sinpi(double3 x); double4 __ovld __cnfn sinpi(double4 x); double8 __ovld __cnfn sinpi(double8 x); double16 __ovld __cnfn sinpi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn sinpi(half x); half2 __ovld __cnfn sinpi(half2 x); @@ -8586,14 +8586,14 @@ float4 __ovld __cnfn sqrt(float4); float8 __ovld __cnfn sqrt(float8); float16 __ovld __cnfn sqrt(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn sqrt(double); double2 __ovld __cnfn sqrt(double2); double3 __ovld __cnfn sqrt(double3); double4 __ovld __cnfn sqrt(double4); double8 __ovld __cnfn sqrt(double8); double16 __ovld __cnfn sqrt(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn sqrt(half); half2 __ovld __cnfn sqrt(half2); @@ -8612,14 +8612,14 @@ float4 __ovld __cnfn tan(float4); float8 __ovld __cnfn tan(float8); float16 __ovld __cnfn tan(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn tan(double); double2 __ovld __cnfn tan(double2); double3 __ovld __cnfn tan(double3); double4 __ovld __cnfn tan(double4); double8 __ovld __cnfn tan(double8); double16 __ovld __cnfn tan(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn tan(half); half2 __ovld __cnfn tan(half2); @@ -8638,14 +8638,14 @@ float4 __ovld __cnfn tanh(float4); float8 __ovld __cnfn tanh(float8); float16 __ovld __cnfn tanh(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn tanh(double); double2 __ovld __cnfn tanh(double2); double3 __ovld __cnfn tanh(double3); double4 __ovld __cnfn tanh(double4); double8 __ovld __cnfn tanh(double8); double16 __ovld __cnfn tanh(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn tanh(half); half2 __ovld __cnfn tanh(half2); @@ -8664,14 +8664,14 @@ float4 __ovld __cnfn tanpi(float4 x); float8 __ovld __cnfn tanpi(float8 x); float16 __ovld __cnfn tanpi(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn tanpi(double x); double2 __ovld __cnfn tanpi(double2 x); double3 __ovld __cnfn tanpi(double3 x); double4 __ovld __cnfn tanpi(double4 x); double8 __ovld __cnfn tanpi(double8 x); double16 __ovld __cnfn tanpi(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn tanpi(half x); half2 __ovld __cnfn tanpi(half2 x); @@ -8690,14 +8690,14 @@ float4 __ovld __cnfn tgamma(float4); float8 __ovld __cnfn tgamma(float8); float16 __ovld __cnfn tgamma(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn tgamma(double); double2 __ovld __cnfn tgamma(double2); double3 __ovld __cnfn tgamma(double3); double4 __ovld __cnfn tgamma(double4); double8 __ovld __cnfn tgamma(double8); double16 __ovld __cnfn tgamma(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn tgamma(half); half2 __ovld __cnfn tgamma(half2); @@ -8717,14 +8717,14 @@ float4 __ovld __cnfn trunc(float4); float8 __ovld __cnfn trunc(float8); float16 __ovld __cnfn trunc(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn trunc(double); double2 __ovld __cnfn trunc(double2); double3 __ovld __cnfn trunc(double3); double4 __ovld __cnfn trunc(double4); double8 __ovld __cnfn trunc(double8); double16 __ovld __cnfn trunc(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn trunc(half); half2 __ovld __cnfn trunc(half2); @@ -10110,7 +10110,7 @@ float4 __ovld __cnfn clamp(float4 x, float minval, float maxval); float8 __ovld __cnfn clamp(float8 x, float minval, float maxval); float16 __ovld __cnfn clamp(float16 x, float minval, float maxval); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn clamp(double x, double minval, double maxval); double2 __ovld __cnfn clamp(double2 x, double2 minval, double2 maxval); double3 __ovld __cnfn clamp(double3 x, double3 minval, double3 maxval); @@ -10122,7 +10122,7 @@ double4 __ovld __cnfn clamp(double4 x, double minval, double maxval); double8 __ovld __cnfn clamp(double8 x, double minval, double maxval); double16 __ovld __cnfn clamp(double16 x, double minval, double maxval); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn clamp(half x, half minval, half maxval); half2 __ovld __cnfn clamp(half2 x, half2 minval, half2 maxval); @@ -10147,14 +10147,14 @@ float4 __ovld __cnfn degrees(float4 radians); float8 __ovld __cnfn degrees(float8 radians); float16 __ovld __cnfn degrees(float16 radians); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn degrees(double radians); double2 __ovld __cnfn degrees(double2 radians); double3 __ovld __cnfn degrees(double3 radians); double4 __ovld __cnfn degrees(double4 radians); double8 __ovld __cnfn degrees(double8 radians); double16 __ovld __cnfn degrees(double16 radians); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn degrees(half radians); half2 __ovld __cnfn degrees(half2 radians); @@ -10179,7 +10179,7 @@ float4 __ovld __cnfn max(float4 x, float y); float8 __ovld __cnfn max(float8 x, float y); float16 __ovld __cnfn max(float16 x, float y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn max(double x, double y); double2 __ovld __cnfn max(double2 x, double2 y); double3 __ovld __cnfn max(double3 x, double3 y); @@ -10191,7 +10191,7 @@ double4 __ovld __cnfn max(double4 x, double y); double8 __ovld __cnfn max(double8 x, double y); double16 __ovld __cnfn max(double16 x, double y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn max(half x, half y); half2 __ovld __cnfn max(half2 x, half2 y); @@ -10221,7 +10221,7 @@ float4 __ovld __cnfn min(float4 x, float y); float8 __ovld __cnfn min(float8 x, float y); float16 __ovld __cnfn min(float16 x, float y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn min(double x, double y); double2 __ovld __cnfn min(double2 x, double2 y); double3 __ovld __cnfn min(double3 x, double3 y); @@ -10233,7 +10233,7 @@ double4 __ovld __cnfn min(double4 x, double y); double8 __ovld __cnfn min(double8 x, double y); double16 __ovld __cnfn min(double16 x, double y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn min(half x, half y); half2 __ovld __cnfn min(half2 x, half2 y); @@ -10266,7 +10266,7 @@ float4 __ovld __cnfn mix(float4 x, float4 y, float a); float8 __ovld __cnfn mix(float8 x, float8 y, float a); float16 __ovld __cnfn mix(float16 x, float16 y, float a); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn mix(double x, double y, double a); double2 __ovld __cnfn mix(double2 x, double2 y, double2 a); double3 __ovld __cnfn mix(double3 x, double3 y, double3 a); @@ -10278,7 +10278,7 @@ double4 __ovld __cnfn mix(double4 x, double4 y, double a); double8 __ovld __cnfn mix(double8 x, double8 y, double a); double16 __ovld __cnfn mix(double16 x, double16 y, double a); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn mix(half x, half y, half a); half2 __ovld __cnfn mix(half2 x, half2 y, half2 a); @@ -10303,14 +10303,14 @@ float4 __ovld __cnfn radians(float4 degrees); float8 __ovld __cnfn radians(float8 degrees); float16 __ovld __cnfn radians(float16 degrees); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn radians(double degrees); double2 __ovld __cnfn radians(double2 degrees); double3 __ovld __cnfn radians(double3 degrees); double4 __ovld __cnfn radians(double4 degrees); double8 __ovld __cnfn radians(double8 degrees); double16 __ovld __cnfn radians(double16 degrees); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn radians(half degrees); half2 __ovld __cnfn radians(half2 degrees); @@ -10334,7 +10334,7 @@ float4 __ovld __cnfn step(float edge, float4 x); float8 __ovld __cnfn step(float edge, float8 x); float16 __ovld __cnfn step(float edge, float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn step(double edge, double x); double2 __ovld __cnfn step(double2 edge, double2 x); double3 __ovld __cnfn step(double3 edge, double3 x); @@ -10346,7 +10346,7 @@ double4 __ovld __cnfn step(double edge, double4 x); double8 __ovld __cnfn step(double edge, double8 x); double16 __ovld __cnfn step(double edge, double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn step(half edge, half x); half2 __ovld __cnfn step(half2 edge, half2 x); @@ -10385,7 +10385,7 @@ float4 __ovld __cnfn smoothstep(float edge0, float edge1, float4 x); float8 __ovld __cnfn smoothstep(float edge0, float edge1, float8 x); float16 __ovld __cnfn smoothstep(float edge0, float edge1, float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn smoothstep(double edge0, double edge1, double x); double2 __ovld __cnfn smoothstep(double2 edge0, double2 edge1, double2 x); double3 __ovld __cnfn smoothstep(double3 edge0, double3 edge1, double3 x); @@ -10397,7 +10397,7 @@ double4 __ovld __cnfn smoothstep(double edge0, double edge1, double4 x); double8 __ovld __cnfn smoothstep(double edge0, double edge1, double8 x); double16 __ovld __cnfn smoothstep(double edge0, double edge1, double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn smoothstep(half edge0, half edge1, half x); half2 __ovld __cnfn smoothstep(half2 edge0, half2 edge1, half2 x); @@ -10422,14 +10422,14 @@ float4 __ovld __cnfn sign(float4 x); float8 __ovld __cnfn sign(float8 x); float16 __ovld __cnfn sign(float16 x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn sign(double x); double2 __ovld __cnfn sign(double2 x); double3 __ovld __cnfn sign(double3 x); double4 __ovld __cnfn sign(double4 x); double8 __ovld __cnfn sign(double8 x); double16 __ovld __cnfn sign(double16 x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn sign(half x); half2 __ovld __cnfn sign(half2 x); @@ -10447,10 +10447,10 @@ */ float4 __ovld __cnfn cross(float4 p0, float4 p1); float3 __ovld __cnfn cross(float3 p0, float3 p1); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double4 __ovld __cnfn cross(double4 p0, double4 p1); double3 __ovld __cnfn cross(double3 p0, double3 p1); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half4 __ovld __cnfn cross(half4 p0, half4 p1); half3 __ovld __cnfn cross(half3 p0, half3 p1); @@ -10463,12 +10463,12 @@ float __ovld __cnfn dot(float2 p0, float2 p1); float __ovld __cnfn dot(float3 p0, float3 p1); float __ovld __cnfn dot(float4 p0, float4 p1); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn dot(double p0, double p1); double __ovld __cnfn dot(double2 p0, double2 p1); double __ovld __cnfn dot(double3 p0, double3 p1); double __ovld __cnfn dot(double4 p0, double4 p1); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn dot(half p0, half p1); half __ovld __cnfn dot(half2 p0, half2 p1); @@ -10484,12 +10484,12 @@ float __ovld __cnfn distance(float2 p0, float2 p1); float __ovld __cnfn distance(float3 p0, float3 p1); float __ovld __cnfn distance(float4 p0, float4 p1); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn distance(double p0, double p1); double __ovld __cnfn distance(double2 p0, double2 p1); double __ovld __cnfn distance(double3 p0, double3 p1); double __ovld __cnfn distance(double4 p0, double4 p1); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn distance(half p0, half p1); half __ovld __cnfn distance(half2 p0, half2 p1); @@ -10505,12 +10505,12 @@ float __ovld __cnfn length(float2 p); float __ovld __cnfn length(float3 p); float __ovld __cnfn length(float4 p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn length(double p); double __ovld __cnfn length(double2 p); double __ovld __cnfn length(double3 p); double __ovld __cnfn length(double4 p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn length(half p); half __ovld __cnfn length(half2 p); @@ -10526,12 +10526,12 @@ float2 __ovld __cnfn normalize(float2 p); float3 __ovld __cnfn normalize(float3 p); float4 __ovld __cnfn normalize(float4 p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn normalize(double p); double2 __ovld __cnfn normalize(double2 p); double3 __ovld __cnfn normalize(double3 p); double4 __ovld __cnfn normalize(double4 p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn normalize(half p); half2 __ovld __cnfn normalize(half2 p); @@ -10612,14 +10612,14 @@ int4 __ovld __cnfn isequal(float4 x, float4 y); int8 __ovld __cnfn isequal(float8 x, float8 y); int16 __ovld __cnfn isequal(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isequal(double x, double y); long2 __ovld __cnfn isequal(double2 x, double2 y); long3 __ovld __cnfn isequal(double3 x, double3 y); long4 __ovld __cnfn isequal(double4 x, double4 y); long8 __ovld __cnfn isequal(double8 x, double8 y); long16 __ovld __cnfn isequal(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isequal(half x, half y); short2 __ovld __cnfn isequal(half2 x, half2 y); @@ -10638,14 +10638,14 @@ int4 __ovld __cnfn isnotequal(float4 x, float4 y); int8 __ovld __cnfn isnotequal(float8 x, float8 y); int16 __ovld __cnfn isnotequal(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isnotequal(double x, double y); long2 __ovld __cnfn isnotequal(double2 x, double2 y); long3 __ovld __cnfn isnotequal(double3 x, double3 y); long4 __ovld __cnfn isnotequal(double4 x, double4 y); long8 __ovld __cnfn isnotequal(double8 x, double8 y); long16 __ovld __cnfn isnotequal(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isnotequal(half x, half y); short2 __ovld __cnfn isnotequal(half2 x, half2 y); @@ -10664,14 +10664,14 @@ int4 __ovld __cnfn isgreater(float4 x, float4 y); int8 __ovld __cnfn isgreater(float8 x, float8 y); int16 __ovld __cnfn isgreater(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isgreater(double x, double y); long2 __ovld __cnfn isgreater(double2 x, double2 y); long3 __ovld __cnfn isgreater(double3 x, double3 y); long4 __ovld __cnfn isgreater(double4 x, double4 y); long8 __ovld __cnfn isgreater(double8 x, double8 y); long16 __ovld __cnfn isgreater(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isgreater(half x, half y); short2 __ovld __cnfn isgreater(half2 x, half2 y); @@ -10690,14 +10690,14 @@ int4 __ovld __cnfn isgreaterequal(float4 x, float4 y); int8 __ovld __cnfn isgreaterequal(float8 x, float8 y); int16 __ovld __cnfn isgreaterequal(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isgreaterequal(double x, double y); long2 __ovld __cnfn isgreaterequal(double2 x, double2 y); long3 __ovld __cnfn isgreaterequal(double3 x, double3 y); long4 __ovld __cnfn isgreaterequal(double4 x, double4 y); long8 __ovld __cnfn isgreaterequal(double8 x, double8 y); long16 __ovld __cnfn isgreaterequal(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isgreaterequal(half x, half y); short2 __ovld __cnfn isgreaterequal(half2 x, half2 y); @@ -10716,14 +10716,14 @@ int4 __ovld __cnfn isless(float4 x, float4 y); int8 __ovld __cnfn isless(float8 x, float8 y); int16 __ovld __cnfn isless(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isless(double x, double y); long2 __ovld __cnfn isless(double2 x, double2 y); long3 __ovld __cnfn isless(double3 x, double3 y); long4 __ovld __cnfn isless(double4 x, double4 y); long8 __ovld __cnfn isless(double8 x, double8 y); long16 __ovld __cnfn isless(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isless(half x, half y); short2 __ovld __cnfn isless(half2 x, half2 y); @@ -10742,14 +10742,14 @@ int4 __ovld __cnfn islessequal(float4 x, float4 y); int8 __ovld __cnfn islessequal(float8 x, float8 y); int16 __ovld __cnfn islessequal(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn islessequal(double x, double y); long2 __ovld __cnfn islessequal(double2 x, double2 y); long3 __ovld __cnfn islessequal(double3 x, double3 y); long4 __ovld __cnfn islessequal(double4 x, double4 y); long8 __ovld __cnfn islessequal(double8 x, double8 y); long16 __ovld __cnfn islessequal(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn islessequal(half x, half y); short2 __ovld __cnfn islessequal(half2 x, half2 y); @@ -10769,14 +10769,14 @@ int4 __ovld __cnfn islessgreater(float4 x, float4 y); int8 __ovld __cnfn islessgreater(float8 x, float8 y); int16 __ovld __cnfn islessgreater(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn islessgreater(double x, double y); long2 __ovld __cnfn islessgreater(double2 x, double2 y); long3 __ovld __cnfn islessgreater(double3 x, double3 y); long4 __ovld __cnfn islessgreater(double4 x, double4 y); long8 __ovld __cnfn islessgreater(double8 x, double8 y); long16 __ovld __cnfn islessgreater(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn islessgreater(half x, half y); short2 __ovld __cnfn islessgreater(half2 x, half2 y); @@ -10795,14 +10795,14 @@ int4 __ovld __cnfn isfinite(float4); int8 __ovld __cnfn isfinite(float8); int16 __ovld __cnfn isfinite(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isfinite(double); long2 __ovld __cnfn isfinite(double2); long3 __ovld __cnfn isfinite(double3); long4 __ovld __cnfn isfinite(double4); long8 __ovld __cnfn isfinite(double8); long16 __ovld __cnfn isfinite(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isfinite(half); short2 __ovld __cnfn isfinite(half2); @@ -10821,14 +10821,14 @@ int4 __ovld __cnfn isinf(float4); int8 __ovld __cnfn isinf(float8); int16 __ovld __cnfn isinf(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isinf(double); long2 __ovld __cnfn isinf(double2); long3 __ovld __cnfn isinf(double3); long4 __ovld __cnfn isinf(double4); long8 __ovld __cnfn isinf(double8); long16 __ovld __cnfn isinf(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isinf(half); short2 __ovld __cnfn isinf(half2); @@ -10847,14 +10847,14 @@ int4 __ovld __cnfn isnan(float4); int8 __ovld __cnfn isnan(float8); int16 __ovld __cnfn isnan(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isnan(double); long2 __ovld __cnfn isnan(double2); long3 __ovld __cnfn isnan(double3); long4 __ovld __cnfn isnan(double4); long8 __ovld __cnfn isnan(double8); long16 __ovld __cnfn isnan(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isnan(half); short2 __ovld __cnfn isnan(half2); @@ -10873,14 +10873,14 @@ int4 __ovld __cnfn isnormal(float4); int8 __ovld __cnfn isnormal(float8); int16 __ovld __cnfn isnormal(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isnormal(double); long2 __ovld __cnfn isnormal(double2); long3 __ovld __cnfn isnormal(double3); long4 __ovld __cnfn isnormal(double4); long8 __ovld __cnfn isnormal(double8); long16 __ovld __cnfn isnormal(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isnormal(half); short2 __ovld __cnfn isnormal(half2); @@ -10901,14 +10901,14 @@ int4 __ovld __cnfn isordered(float4 x, float4 y); int8 __ovld __cnfn isordered(float8 x, float8 y); int16 __ovld __cnfn isordered(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isordered(double x, double y); long2 __ovld __cnfn isordered(double2 x, double2 y); long3 __ovld __cnfn isordered(double3 x, double3 y); long4 __ovld __cnfn isordered(double4 x, double4 y); long8 __ovld __cnfn isordered(double8 x, double8 y); long16 __ovld __cnfn isordered(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isordered(half x, half y); short2 __ovld __cnfn isordered(half2 x, half2 y); @@ -10929,14 +10929,14 @@ int4 __ovld __cnfn isunordered(float4 x, float4 y); int8 __ovld __cnfn isunordered(float8 x, float8 y); int16 __ovld __cnfn isunordered(float16 x, float16 y); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn isunordered(double x, double y); long2 __ovld __cnfn isunordered(double2 x, double2 y); long3 __ovld __cnfn isunordered(double3 x, double3 y); long4 __ovld __cnfn isunordered(double4 x, double4 y); long8 __ovld __cnfn isunordered(double8 x, double8 y); long16 __ovld __cnfn isunordered(double16 x, double16 y); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn isunordered(half x, half y); short2 __ovld __cnfn isunordered(half2 x, half2 y); @@ -10959,14 +10959,14 @@ int4 __ovld __cnfn signbit(float4); int8 __ovld __cnfn signbit(float8); int16 __ovld __cnfn signbit(float16); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld __cnfn signbit(double); long2 __ovld __cnfn signbit(double2); long3 __ovld __cnfn signbit(double3); long4 __ovld __cnfn signbit(double4); long8 __ovld __cnfn signbit(double8); long16 __ovld __cnfn signbit(double16); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 int __ovld __cnfn signbit(half); short2 __ovld __cnfn signbit(half2); @@ -11093,14 +11093,14 @@ float4 __ovld __cnfn bitselect(float4 a, float4 b, float4 c); float8 __ovld __cnfn bitselect(float8 a, float8 b, float8 c); float16 __ovld __cnfn bitselect(float16 a, float16 b, float16 c); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn bitselect(double a, double b, double c); double2 __ovld __cnfn bitselect(double2 a, double2 b, double2 c); double3 __ovld __cnfn bitselect(double3 a, double3 b, double3 c); double4 __ovld __cnfn bitselect(double4 a, double4 b, double4 c); double8 __ovld __cnfn bitselect(double8 a, double8 b, double8 c); double16 __ovld __cnfn bitselect(double16 a, double16 b, double16 c); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn bitselect(half a, half b, half c); half2 __ovld __cnfn bitselect(half2 a, half2 b, half2 c); @@ -11233,7 +11233,7 @@ long16 __ovld __cnfn select(long16 a, long16 b, ulong16 c); ulong16 __ovld __cnfn select(ulong16 a, ulong16 b, ulong16 c); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __cnfn select(double a, double b, long c); double2 __ovld __cnfn select(double2 a, double2 b, long2 c); double3 __ovld __cnfn select(double3 a, double3 b, long3 c); @@ -11246,7 +11246,7 @@ double4 __ovld __cnfn select(double4 a, double4 b, ulong4 c); double8 __ovld __cnfn select(double8 a, double8 b, ulong8 c); double16 __ovld __cnfn select(double16 a, double16 b, ulong16 c); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __cnfn select(half a, half b, short c); half2 __ovld __cnfn select(half2 a, half2 b, short2 c); @@ -11325,13 +11325,13 @@ long16 __ovld vload16(size_t offset, const __constant long *p); ulong16 __ovld vload16(size_t offset, const __constant ulong *p); float16 __ovld vload16(size_t offset, const __constant float *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double2 __ovld vload2(size_t offset, const __constant double *p); double3 __ovld vload3(size_t offset, const __constant double *p); double4 __ovld vload4(size_t offset, const __constant double *p); double8 __ovld vload8(size_t offset, const __constant double *p); double16 __ovld vload16(size_t offset, const __constant double *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld vload(size_t offset, const __constant half *p); @@ -11389,13 +11389,13 @@ ulong16 __ovld vload16(size_t offset, const ulong *p); float16 __ovld vload16(size_t offset, const float *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double2 __ovld vload2(size_t offset, const double *p); double3 __ovld vload3(size_t offset, const double *p); double4 __ovld vload4(size_t offset, const double *p); double8 __ovld vload8(size_t offset, const double *p); double16 __ovld vload16(size_t offset, const double *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld vload(size_t offset, const half *p); @@ -11542,7 +11542,7 @@ ulong16 __ovld vload16(size_t offset, const __private ulong *p); float16 __ovld vload16(size_t offset, const __private float *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double2 __ovld vload2(size_t offset, const __global double *p); double3 __ovld vload3(size_t offset, const __global double *p); double4 __ovld vload4(size_t offset, const __global double *p); @@ -11558,7 +11558,7 @@ double4 __ovld vload4(size_t offset, const __private double *p); double8 __ovld vload8(size_t offset, const __private double *p); double16 __ovld vload16(size_t offset, const __private double *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld vload(size_t offset, const __global half *p); @@ -11628,13 +11628,13 @@ void __ovld vstore16(long16 data, size_t offset, long *p); void __ovld vstore16(ulong16 data, size_t offset, ulong *p); void __ovld vstore16(float16 data, size_t offset, float *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore2(double2 data, size_t offset, double *p); void __ovld vstore3(double3 data, size_t offset, double *p); void __ovld vstore4(double4 data, size_t offset, double *p); void __ovld vstore8(double8 data, size_t offset, double *p); void __ovld vstore16(double16 data, size_t offset, double *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 void __ovld vstore(half data, size_t offset, half *p); void __ovld vstore2(half2 data, size_t offset, half *p); @@ -11779,7 +11779,7 @@ void __ovld vstore16(long16 data, size_t offset, __private long *p); void __ovld vstore16(ulong16 data, size_t offset, __private ulong *p); void __ovld vstore16(float16 data, size_t offset, __private float *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore2(double2 data, size_t offset, __global double *p); void __ovld vstore3(double3 data, size_t offset, __global double *p); void __ovld vstore4(double4 data, size_t offset, __global double *p); @@ -11795,7 +11795,7 @@ void __ovld vstore4(double4 data, size_t offset, __private double *p); void __ovld vstore8(double8 data, size_t offset, __private double *p); void __ovld vstore16(double16 data, size_t offset, __private double *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 void __ovld vstore(half data, size_t offset, __global half *p); void __ovld vstore2(half2 data, size_t offset, __global half *p); @@ -11889,13 +11889,13 @@ void __ovld vstore_half_rtz(float data, size_t offset, half *p); void __ovld vstore_half_rtp(float data, size_t offset, half *p); void __ovld vstore_half_rtn(float data, size_t offset, half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore_half(double data, size_t offset, half *p); void __ovld vstore_half_rte(double data, size_t offset, half *p); void __ovld vstore_half_rtz(double data, size_t offset, half *p); void __ovld vstore_half_rtp(double data, size_t offset, half *p); void __ovld vstore_half_rtn(double data, size_t offset, half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #else void __ovld vstore_half(float data, size_t offset, __global half *p); void __ovld vstore_half_rte(float data, size_t offset, __global half *p); @@ -11912,7 +11912,7 @@ void __ovld vstore_half_rtz(float data, size_t offset, __private half *p); void __ovld vstore_half_rtp(float data, size_t offset, __private half *p); void __ovld vstore_half_rtn(float data, size_t offset, __private half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore_half(double data, size_t offset, __global half *p); void __ovld vstore_half_rte(double data, size_t offset, __global half *p); void __ovld vstore_half_rtz(double data, size_t offset, __global half *p); @@ -11928,7 +11928,7 @@ void __ovld vstore_half_rtz(double data, size_t offset, __private half *p); void __ovld vstore_half_rtp(double data, size_t offset, __private half *p); void __ovld vstore_half_rtn(double data, size_t offset, __private half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) /** @@ -11968,7 +11968,7 @@ void __ovld vstore_half4_rtn(float4 data, size_t offset, half *p); void __ovld vstore_half8_rtn(float8 data, size_t offset, half *p); void __ovld vstore_half16_rtn(float16 data, size_t offset, half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore_half2(double2 data, size_t offset, half *p); void __ovld vstore_half3(double3 data, size_t offset, half *p); void __ovld vstore_half4(double4 data, size_t offset, half *p); @@ -11994,7 +11994,7 @@ void __ovld vstore_half4_rtn(double4 data, size_t offset, half *p); void __ovld vstore_half8_rtn(double8 data, size_t offset, half *p); void __ovld vstore_half16_rtn(double16 data, size_t offset, half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #else void __ovld vstore_half2(float2 data, size_t offset, __global half *p); void __ovld vstore_half3(float3 data, size_t offset, __global half *p); @@ -12071,7 +12071,7 @@ void __ovld vstore_half4_rtn(float4 data, size_t offset, __private half *p); void __ovld vstore_half8_rtn(float8 data, size_t offset, __private half *p); void __ovld vstore_half16_rtn(float16 data, size_t offset, __private half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstore_half2(double2 data, size_t offset, __global half *p); void __ovld vstore_half3(double3 data, size_t offset, __global half *p); void __ovld vstore_half4(double4 data, size_t offset, __global half *p); @@ -12147,7 +12147,7 @@ void __ovld vstore_half4_rtn(double4 data, size_t offset, __private half *p); void __ovld vstore_half8_rtn(double8 data, size_t offset, __private half *p); void __ovld vstore_half16_rtn(double16 data, size_t offset, __private half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) /** @@ -12249,7 +12249,7 @@ void __ovld vstorea_half8_rtn(float8 data, size_t offset, half *p); void __ovld vstorea_half16_rtn(float16 data, size_t offset, half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstorea_half(double data, size_t offset, half *p); void __ovld vstorea_half2(double2 data, size_t offset, half *p); void __ovld vstorea_half3(double3 data, size_t offset, half *p); @@ -12284,7 +12284,7 @@ void __ovld vstorea_half4_rtn(double4 data, size_t offset, half *p); void __ovld vstorea_half8_rtn(double8 data, size_t offset, half *p); void __ovld vstorea_half16_rtn(double16 data, size_t offset, half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #else void __ovld vstorea_half(float data, size_t offset, __global half *p); @@ -12392,7 +12392,7 @@ void __ovld vstorea_half8_rtn(float8 data, size_t offset, __private half *p); void __ovld vstorea_half16_rtn(float16 data, size_t offset, __private half *p); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld vstorea_half(double data, size_t offset, __global half *p); void __ovld vstorea_half2(double2 data, size_t offset, __global half *p); void __ovld vstorea_half3(double3 data, size_t offset, __global half *p); @@ -12497,7 +12497,7 @@ void __ovld vstorea_half4_rtn(double4 data,size_t offset, __private half *p); void __ovld vstorea_half8_rtn(double8 data,size_t offset, __private half *p); void __ovld vstorea_half16_rtn(double16 data,size_t offset, __private half *p); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) // OpenCL v1.1 s6.11.8, v1.2 s6.12.8, v2.0 s6.13.8 - Synchronization Functions @@ -12732,7 +12732,7 @@ event_t __ovld async_work_group_copy(__global long16 *dst, const __local long16 *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__global ulong16 *dst, const __local ulong16 *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__global float16 *dst, const __local float16 *src, size_t num_elements, event_t event); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) event_t __ovld async_work_group_copy(__local double *dst, const __global double *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__local double2 *dst, const __global double2 *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__local double3 *dst, const __global double3 *src, size_t num_elements, event_t event); @@ -12745,7 +12745,7 @@ event_t __ovld async_work_group_copy(__global double4 *dst, const __local double4 *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__global double8 *dst, const __local double8 *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__global double16 *dst, const __local double16 *src, size_t num_elements, event_t event); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 event_t __ovld async_work_group_copy(__local half *dst, const __global half *src, size_t num_elements, event_t event); event_t __ovld async_work_group_copy(__local half2 *dst, const __global half2 *src, size_t num_elements, event_t event); @@ -12895,7 +12895,7 @@ event_t __ovld async_work_group_strided_copy(__global long16 *dst, const __local long16 *src, size_t num_elements, size_t dst_stride, event_t event); event_t __ovld async_work_group_strided_copy(__global ulong16 *dst, const __local ulong16 *src, size_t num_elements, size_t dst_stride, event_t event); event_t __ovld async_work_group_strided_copy(__global float16 *dst, const __local float16 *src, size_t num_elements, size_t dst_stride, event_t event); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) event_t __ovld async_work_group_strided_copy(__local double *dst, const __global double *src, size_t num_elements, size_t src_stride, event_t event); event_t __ovld async_work_group_strided_copy(__local double2 *dst, const __global double2 *src, size_t num_elements, size_t src_stride, event_t event); event_t __ovld async_work_group_strided_copy(__local double3 *dst, const __global double3 *src, size_t num_elements, size_t src_stride, event_t event); @@ -12908,7 +12908,7 @@ event_t __ovld async_work_group_strided_copy(__global double4 *dst, const __local double4 *src, size_t num_elements, size_t dst_stride, event_t event); event_t __ovld async_work_group_strided_copy(__global double8 *dst, const __local double8 *src, size_t num_elements, size_t dst_stride, event_t event); event_t __ovld async_work_group_strided_copy(__global double16 *dst, const __local double16 *src, size_t num_elements, size_t dst_stride, event_t event); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 event_t __ovld async_work_group_strided_copy(__local half *dst, const __global half *src, size_t num_elements, size_t src_stride, event_t event); event_t __ovld async_work_group_strided_copy(__local half2 *dst, const __global half2 *src, size_t num_elements, size_t src_stride, event_t event); @@ -12998,14 +12998,14 @@ void __ovld prefetch(const __global long16 *p, size_t num_elements); void __ovld prefetch(const __global ulong16 *p, size_t num_elements); void __ovld prefetch(const __global float16 *p, size_t num_elements); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld prefetch(const __global double *p, size_t num_elements); void __ovld prefetch(const __global double2 *p, size_t num_elements); void __ovld prefetch(const __global double3 *p, size_t num_elements); void __ovld prefetch(const __global double4 *p, size_t num_elements); void __ovld prefetch(const __global double8 *p, size_t num_elements); void __ovld prefetch(const __global double16 *p, size_t num_elements); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 void __ovld prefetch(const __global half *p, size_t num_elements); void __ovld prefetch(const __global half2 *p, size_t num_elements); @@ -13388,9 +13388,9 @@ #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) void __ovld atomic_init(volatile atomic_long *object, long value); void __ovld atomic_init(volatile atomic_ulong *object, ulong value); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld atomic_init(volatile atomic_double *object, double value); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // atomic_work_item_fence() @@ -13543,11 +13543,11 @@ void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order); void __ovld atomic_store_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld atomic_store(volatile atomic_double *object, double desired); void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order); void __ovld atomic_store_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) void __ovld atomic_store(volatile atomic_long *object, long desired); void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order); void __ovld atomic_store_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); @@ -13568,11 +13568,11 @@ float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order); float __ovld atomic_load_explicit(volatile atomic_float *object, memory_order order, memory_scope scope); #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld atomic_load(volatile atomic_double *object); double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order); double __ovld atomic_load_explicit(volatile atomic_double *object, memory_order order, memory_scope scope); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) long __ovld atomic_load(volatile atomic_long *object); long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order); long __ovld atomic_load_explicit(volatile atomic_long *object, memory_order order, memory_scope scope); @@ -13593,11 +13593,11 @@ float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order); float __ovld atomic_exchange_explicit(volatile atomic_float *object, float desired, memory_order order, memory_scope scope); #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld atomic_exchange(volatile atomic_double *object, double desired); double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order); double __ovld atomic_exchange_explicit(volatile atomic_double *object, double desired, memory_order order, memory_scope scope); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) long __ovld atomic_exchange(volatile atomic_long *object, long desired); long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order); long __ovld atomic_exchange_explicit(volatile atomic_long *object, long desired, memory_order order, memory_scope scope); @@ -13639,7 +13639,7 @@ bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_float *object, float *expected, float desired, memory_order success, memory_order failure, memory_scope scope); #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) bool __ovld atomic_compare_exchange_strong(volatile atomic_double *object, double *expected, double desired); bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_double *object, double *expected, double desired, memory_order success, memory_order failure); @@ -13650,7 +13650,7 @@ double desired, memory_order success, memory_order failure); bool __ovld atomic_compare_exchange_weak_explicit(volatile atomic_double *object, double *expected, double desired, memory_order success, memory_order failure, memory_scope scope); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) bool __ovld atomic_compare_exchange_strong(volatile atomic_long *object, long *expected, long desired); bool __ovld atomic_compare_exchange_strong_explicit(volatile atomic_long *object, long *expected, long desired, memory_order success, memory_order failure); @@ -13908,7 +13908,7 @@ float16 __ovld __cnfn shuffle(float8 x, uint16 mask); float16 __ovld __cnfn shuffle(float16 x, uint16 mask); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double2 __ovld __cnfn shuffle(double2 x, ulong2 mask); double2 __ovld __cnfn shuffle(double4 x, ulong2 mask); double2 __ovld __cnfn shuffle(double8 x, ulong2 mask); @@ -13928,7 +13928,7 @@ double16 __ovld __cnfn shuffle(double4 x, ulong16 mask); double16 __ovld __cnfn shuffle(double8 x, ulong16 mask); double16 __ovld __cnfn shuffle(double16 x, ulong16 mask); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half2 __ovld __cnfn shuffle(half2 x, ushort2 mask); @@ -14132,7 +14132,7 @@ float16 __ovld __cnfn shuffle2(float8 x, float8 y, uint16 mask); float16 __ovld __cnfn shuffle2(float16 x, float16 y, uint16 mask); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double2 __ovld __cnfn shuffle2(double2 x, double2 y, ulong2 mask); double2 __ovld __cnfn shuffle2(double4 x, double4 y, ulong2 mask); double2 __ovld __cnfn shuffle2(double8 x, double8 y, ulong2 mask); @@ -14152,7 +14152,7 @@ double16 __ovld __cnfn shuffle2(double4 x, double4 y, ulong16 mask); double16 __ovld __cnfn shuffle2(double8 x, double8 y, ulong16 mask); double16 __ovld __cnfn shuffle2(double16 x, double16 y, ulong16 mask); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half2 __ovld __cnfn shuffle2(half2 x, half2 y, ushort2 mask); @@ -15245,11 +15245,11 @@ float __ovld __conv work_group_broadcast(float a, size_t local_id); float __ovld __conv work_group_broadcast(float a, size_t x, size_t y); float __ovld __conv work_group_broadcast(float a, size_t x, size_t y, size_t z); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __conv work_group_broadcast(double a, size_t local_id); double __ovld __conv work_group_broadcast(double a, size_t x, size_t y); double __ovld __conv work_group_broadcast(double a, size_t x, size_t y, size_t z); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #ifdef cl_khr_fp16 half __ovld __conv work_group_reduce_add(half x); @@ -15307,7 +15307,7 @@ float __ovld __conv work_group_scan_inclusive_add(float x); float __ovld __conv work_group_scan_inclusive_min(float x); float __ovld __conv work_group_scan_inclusive_max(float x); -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __conv work_group_reduce_add(double x); double __ovld __conv work_group_reduce_min(double x); double __ovld __conv work_group_reduce_max(double x); @@ -15317,7 +15317,7 @@ double __ovld __conv work_group_scan_inclusive_add(double x); double __ovld __conv work_group_scan_inclusive_min(double x); double __ovld __conv work_group_scan_inclusive_max(double x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) @@ -15447,7 +15447,7 @@ half __ovld __conv sub_group_scan_inclusive_max(half x); #endif //cl_khr_fp16 -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __conv sub_group_broadcast(double x, uint sub_group_local_id); double __ovld __conv sub_group_reduce_add(double x); double __ovld __conv sub_group_reduce_min(double x); @@ -15458,7 +15458,7 @@ double __ovld __conv sub_group_scan_inclusive_add(double x); double __ovld __conv sub_group_scan_inclusive_min(double x); double __ovld __conv sub_group_scan_inclusive_max(double x); -#endif //cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif //cl_khr_subgroups cl_intel_subgroups @@ -15580,14 +15580,14 @@ half16 __ovld __conv sub_group_broadcast( half16 value, uint index ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) // scalar double broadcast is part of cl_khr_subgroups double2 __ovld __conv sub_group_broadcast( double2 value, uint index ); double3 __ovld __conv sub_group_broadcast( double3 value, uint index ); double4 __ovld __conv sub_group_broadcast( double4 value, uint index ); double8 __ovld __conv sub_group_broadcast( double8 value, uint index ); double16 __ovld __conv sub_group_broadcast( double16 value, uint index ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_extended_types @@ -15610,9 +15610,9 @@ int __ovld sub_group_non_uniform_all_equal( half value ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) int __ovld sub_group_non_uniform_all_equal( double value ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_non_uniform_vote @@ -15717,7 +15717,7 @@ half __ovld sub_group_broadcast_first( half value ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sub_group_non_uniform_broadcast( double value, uint index ); double2 __ovld sub_group_non_uniform_broadcast( double2 value, uint index ); double3 __ovld sub_group_non_uniform_broadcast( double3 value, uint index ); @@ -15726,7 +15726,7 @@ double16 __ovld sub_group_non_uniform_broadcast( double16 value, uint index ); double __ovld sub_group_broadcast_first( double value ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_ballot @@ -15959,7 +15959,7 @@ half __ovld sub_group_non_uniform_scan_exclusive_max( half value ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sub_group_non_uniform_reduce_add( double value ); double __ovld sub_group_non_uniform_reduce_mul( double value ); double __ovld sub_group_non_uniform_reduce_min( double value ); @@ -15972,7 +15972,7 @@ double __ovld sub_group_non_uniform_scan_exclusive_mul( double value ); double __ovld sub_group_non_uniform_scan_exclusive_min( double value ); double __ovld sub_group_non_uniform_scan_exclusive_max( double value ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_non_uniform_arithmetic @@ -16002,10 +16002,10 @@ half __ovld sub_group_shuffle_xor( half value, uint mask ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sub_group_shuffle( double value, uint index ); double __ovld sub_group_shuffle_xor( double value, uint mask ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_shuffle @@ -16035,10 +16035,10 @@ half __ovld sub_group_shuffle_down( half value, uint delta ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sub_group_shuffle_up( double value, uint delta ); double __ovld sub_group_shuffle_down( double value, uint delta ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_shuffle_relative @@ -16121,12 +16121,12 @@ half __ovld sub_group_clustered_reduce_max( half value, uint clustersize ); #endif // cl_khr_fp16 -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld sub_group_clustered_reduce_add( double value, uint clustersize ); double __ovld sub_group_clustered_reduce_mul( double value, uint clustersize ); double __ovld sub_group_clustered_reduce_min( double value, uint clustersize ); double __ovld sub_group_clustered_reduce_max( double value, uint clustersize ); -#endif // cl_khr_fp64 +#endif // defined(cl_khr_fp64) || defined(__opencl_c_fp64) #endif // cl_khr_subgroup_clustered_reduce @@ -16269,7 +16269,7 @@ half __ovld __conv intel_sub_group_shuffle_xor( half x, uint c ); #endif -#if defined(cl_khr_fp64) +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) double __ovld __conv intel_sub_group_shuffle( double x, uint c ); double __ovld __conv intel_sub_group_shuffle_down( double prev, double cur, uint c ); double __ovld __conv intel_sub_group_shuffle_up( double prev, double cur, uint c ); diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -352,11 +352,16 @@ for (auto &I : Atomic64BitTypes) setOpenCLExtensionForType(I, "cl_khr_int64_base_atomics cl_khr_int64_extended_atomics"); - - setOpenCLExtensionForType(AtomicDoubleT, "cl_khr_fp64"); + if (getLangOpts().OpenCLVersion >= 300) + setOpenCLExtensionForType(AtomicDoubleT, "__opencl_c_fp64"); + else + setOpenCLExtensionForType(AtomicDoubleT, "cl_khr_fp64"); } - setOpenCLExtensionForType(Context.DoubleTy, "cl_khr_fp64"); + if (getLangOpts().OpenCLVersion >= 300) + setOpenCLExtensionForType(Context.DoubleTy, "__opencl_c_fp64"); + else + setOpenCLExtensionForType(Context.DoubleTy, "cl_khr_fp64"); #define GENERIC_IMAGE_TYPE_EXT(Type, Id, Ext) \ setOpenCLExtensionForType(Context.Id, Ext); @@ -2514,8 +2519,9 @@ bool Disabled = false; for (auto &I : Loc->second) { if (I != CurrOpenCLExtension && !getOpenCLOptions().isEnabled(I)) { - Diag(DiagLoc, diag::err_opencl_requires_extension) << Selector << DiagInfo - << I << SrcRange; + Diag(DiagLoc, diag::err_opencl_requires_extension) + << Selector << DiagInfo << I << getOpenCLOptions().isFeature(I) + << SrcRange; Disabled = true; } } diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -837,9 +837,11 @@ } static bool checkOpenCLSubgroupExt(Sema &S, CallExpr *Call) { - if (!S.getOpenCLOptions().isEnabled("cl_khr_subgroups")) { + llvm::StringRef SubgroupExtName("cl_khr_subgroups"); + if (!S.getOpenCLOptions().isEnabled(SubgroupExtName)) { S.Diag(Call->getBeginLoc(), diag::err_opencl_requires_extension) - << 1 << Call->getDirectCallee() << "cl_khr_subgroups"; + << 1 << Call->getDirectCallee() << SubgroupExtName + << S.getOpenCLOptions().isFeature(SubgroupExtName); return true; } return false; diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -829,10 +829,10 @@ if (BTy && (BTy->getKind() == BuiltinType::Half || BTy->getKind() == BuiltinType::Float)) { if (getLangOpts().OpenCL && - !getOpenCLOptions().isEnabled("cl_khr_fp64")) { - if (BTy->getKind() == BuiltinType::Half) { - E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); - } + !getOpenCLOptions().isFP64Enabled(getLangOpts())) { + if (BTy->getKind() == BuiltinType::Half) { + E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); + } } else { E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); } @@ -3844,9 +3844,10 @@ Res = ImpCastExprToType(Res, Context.FloatTy, CK_FloatingCast).get(); } } else if (getLangOpts().OpenCL && - !getOpenCLOptions().isEnabled("cl_khr_fp64")) { + !getOpenCLOptions().isFP64Enabled(getLangOpts())) { // Impose single-precision float type when cl_khr_fp64 is not enabled. - Diag(Tok.getLocation(), diag::warn_double_const_requires_fp64); + Diag(Tok.getLocation(), diag::warn_double_const_requires_fp64) + << (getLangOpts().OpenCLVersion >= 300); Res = ImpCastExprToType(Res, Context.FloatTy, CK_FloatingCast).get(); } } diff --git a/clang/test/CodeGenOpenCL/printf.cl b/clang/test/CodeGenOpenCL/printf.cl --- a/clang/test/CodeGenOpenCL/printf.cl +++ b/clang/test/CodeGenOpenCL/printf.cl @@ -1,10 +1,12 @@ // RUN: %clang_cc1 -cl-std=CL1.2 -cl-ext=-+cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=FP64,ALL %s // RUN: %clang_cc1 -cl-std=CL1.2 -cl-ext=-cl_khr_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=NOFP64,ALL %s +// RUN: %clang_cc1 -cl-std=CL3.0 -cl-ext=+__opencl_c_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=FP64,ALL %s +// RUN: %clang_cc1 -cl-std=CL3.0 -cl-ext=-__opencl_c_fp64 -triple spir-unknown-unknown -disable-llvm-passes -emit-llvm -o - %s | FileCheck -check-prefixes=NOFP64,ALL %s typedef __attribute__((ext_vector_type(2))) float float2; typedef __attribute__((ext_vector_type(2))) half half2; -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) typedef __attribute__((ext_vector_type(2))) double double2; #endif @@ -28,7 +30,7 @@ printf("%v2hf", arg); } -#ifdef cl_khr_fp64 +#if defined(cl_khr_fp64) || defined(__opencl_c_fp64) // FP64-LABEL: @test_printf_double2( // FP64: call spir_func i32 (i8 addrspace(2)*, ...) @printf(i8 addrspace(2)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(2)* @.str.2, i32 0, i32 0), <2 x double> %0) kernel void test_printf_double2(double2 arg) { diff --git a/clang/test/SemaOpenCL/opencl-fp64-feature.cl b/clang/test/SemaOpenCL/opencl-fp64-feature.cl new file mode 100644 --- /dev/null +++ b/clang/test/SemaOpenCL/opencl-fp64-feature.cl @@ -0,0 +1,48 @@ +// Test with a target not supporting fp64. +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -DNOFP64 + +// Test with features enable by cmd-line args +// +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+__opencl_c_fp64 +// +// Disable or enable all features +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-all -DNOFP64 +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple r600-unknown-unknown -target-cpu r600 -verify -pedantic -fsyntax-only -cl-ext=+all,-__opencl_c_fp64 -DNOFP64 +// +// Concatenating +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64 -cl-ext=+__opencl_c_fp64 +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64,+__opencl_c_fp64 +// RUN: %clang_cc1 -cl-std=CL3.0 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-ext=-__opencl_c_fp64,+cl_khr_fp64 -DNOFP64 + +#ifndef NOFP64 +// expected-no-diagnostics +#endif + + +void f1(double da) { +#ifdef NOFP64 +// expected-error@-2 {{type 'double' requires __opencl_c_fp64 feature}} +#endif +} + +void f2(void) { + double d; +#ifdef NOFP64 +// expected-error@-2{{use of type 'double' requires __opencl_c_fp64 feature to be enabled}} +#endif + + typedef double double4 __attribute__((ext_vector_type(4))); + double4 d4 = {0.0f, 2.0f, 3.0f, 1.0f}; +#ifdef NOFP64 +// expected-error@-3 {{use of type 'double' requires __opencl_c_fp64 feature to be enabled}} +// expected-error@-3 {{use of type 'double4' (vector of 4 'double' values) requires __opencl_c_fp64 feature to be enabled}} +#endif + + (void) 1.0; + +#ifdef NOFP64 +// expected-warning@-3{{double precision constant requires __opencl_c_fp64, casting to single precision}} +#endif +} +