Wsiegenthaler/nativelibs4java — comment on commit e6217d8794b58fbffc939fcd18cba8d86137c774
File:  line 0
By ochafik:

Haha, very right, sorry !

However I still believe we should provide a randomInt(n: Int): Int function, maybe in a CLMath trait that would be mixed in by the scalacl package object ? Its Scala-side implementation would just return (random * n).toInt, and its ScalaCL replacement would be mwc64xIntValueCode = "MWC64X_NextUint(...)".
There are way too many GPUs that don't support doubles :-S.
Also, we could detect cases where random is immediately cast to a float, and use a mwc64xFloatValueCode in that case (a similar logic is done in OpenCLConverter with float sin / cos calls).
Oh, and before I forget : have you thought of adding a "#pragma OPENCL EXTENSION cl_khr_fp64: enable" outer declaration in case you use doubles for good ? You can see how OpenCLConverter.convertMathFunction does that :-)

Cheers