Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 465578 - app-admin/eselect-opencl-1.1.0-r1 uses wrong constants
Summary: app-admin/eselect-opencl-1.1.0-r1 uses wrong constants
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Kacper Kowalik (Xarthisius) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 18:57 UTC by Faust
Modified: 2013-04-12 14:47 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Faust 2013-04-11 18:57:26 UTC
All the constants defined in "/usr/lib64/OpenCL/global/include/CL/cl_platform.h"
matching CL_M_* are wrong.
The original file is downloaded from
https://dev.gentoo.org/~xarthisius/distfiles/cl_platform.h.1.1.xz
Comment 1 Faust 2013-04-11 19:05:27 UTC
Is it easy to verify this by running

$ wget https://dev.gentoo.org/~xarthisius/distfiles/cl_platform.h.1.1.xz -q -O - |xzdec -d|grep CL_M_|sort

and comparing the results with the correct values
Comment 2 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-04-12 14:24:04 UTC
(In reply to comment #0)
> All the constants defined in
> "/usr/lib64/OpenCL/global/include/CL/cl_platform.h"
> matching CL_M_* are wrong.

Could you be more specific, i.e. what's wrong with them?
#define  CL_M_PI            3.141592653589793115998
looks like a pi to me...

> The original file is downloaded from
> https://dev.gentoo.org/~xarthisius/distfiles/cl_platform.h.1.1.xz
Comment 3 Faust 2013-04-12 14:42:39 UTC
The correct value of PI approximated to the 21st decimal digit would be
3.141592653589793238463
and not
3.141592653589793115998
Of course the difference is small, but I think that would be better if you correct this error (and the others, because there are small approximation errors in all CL_M_* constats after the 15th decimal digit).
Comment 4 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-04-12 14:47:53 UTC
I've not made up that file, just mirrored it from khronos[1]. You should complain to them, there's nothing I can do about it on Gentoo level.

[1] http://www.khronos.org/