Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JavaCL] System's locale affects source code. #22

Open
ochafik opened this issue Mar 18, 2015 · 0 comments
Open

[JavaCL] System's locale affects source code. #22

ochafik opened this issue Mar 18, 2015 · 0 comments
Labels

Comments

@ochafik
Copy link
Member

ochafik commented Mar 18, 2015

From @mcopik on March 19, 2014 18:56

The locale settings in Linux systems have an impact on kernel source, which is definitely a bug. When the LC_NUMERIC is set to a language in which the integral and fractional parts are separated with a comma rather than with a dot (e.g. pl_PL.UTF-8), then the fractional parts of floating-point literals are missing. For example:

//selection is a floating−point value in interval [0 ,1)
if( selection < 0.5) {
    //never selected !
}
else if ( selection < 1.0) {
    //always selected!
}

This issue doesn't happen when the kernel is executed from a program written in C/C++, using standard OpenCL libraries.
I'm using JavaCL in version 1.0.0-RC3.

Copied from original issue: nativelibs4java/nativelibs4java#489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant