[Libclc-dev] [PATCH 7/7] Add several double constant definitions from CL 1.1

Aaron Watry awatry at gmail.com
Tue Jul 15 15:36:37 PDT 2014


Huh?  These aren't under a version restriction.  These defines were
available in CL 1.0, we just never declared them before (page 230 of
cl 1.0 spec)

On Tue, Jul 15, 2014 at 5:30 PM, Matt Arsenault
<Matthew.Arsenault at amd.com> wrote:
> On 07/15/2014 03:24 PM, Aaron Watry wrote:
>>
>> Signed-off-by: Aaron Watry <awatry at gmail.com>
>> ---
>>   generic/include/clc/float/definitions.h | 11 +++++++++++
>>   1 file changed, 11 insertions(+)
>>
>> diff --git a/generic/include/clc/float/definitions.h
>> b/generic/include/clc/float/definitions.h
>> index 18f2cbc..9ba8e99 100644
>> --- a/generic/include/clc/float/definitions.h
>> +++ b/generic/include/clc/float/definitions.h
>> @@ -42,8 +42,19 @@
>>   #define DBL_MIN         0x1.0p-1022
>>   #define DBL_EPSILON     0x1.0p-52
>>   +#define M_E             2.718281828459045090796
>>   #define M_LOG2E         0x1.71547652b82fep+0
>> +#define M_LOG10E        0.434294481903251816668
>> +#define M_LN2           0.693147180559945286227
>> +#define M_LN10          2.302585092994045901094
>>   #define M_PI            0x1.921fb54442d18p+1
>> +#define M_PI_2          1.570796326794896557999
>> +#define M_PI_4          0.785398163397448278999
>> +#define M_1_PI          0.318309886183790691216
>> +#define M_2_PI          0.636619772367581382433
>> +#define M_2_SQRTPI      1.128379167095512558561
>> +#define M_SQRT2         1.414213562373095145475
>> +#define M_SQRT1_2       0.707106781186547572737
>>     #endif
>>
>
> Should these go under an #if __OPENCL_VERSION__ >= CL_VERSION_1_1? Were
> these really not in 1.0?
>




More information about the Libclc-dev mailing list