Skip to content

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

Open
@ochafik

Description

@ochafik

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions