// disable 64bit floating point math if not available
for(int i = 0; i < programs.length; i++) {
CLDevice device = queues[i].getDevice();
CLProgramConfiguration configure = programs[i].prepare();
if(doublePrecision && isDoubleFPAvailable(device)) {
//cl_khr_fp64
configure.withDefine("DOUBLE_FP");
//amd's verson of double precision floating point math
if(!device.isDoubleFPAvailable() && device.isExtensionAvailable("cl_amd_fp64")) {
configure.withDefine("AMD_FP");
}
}
if(programs.length > 1) {
configure.forDevice(device);
}
System.out.println(configure);
configure.withOption(CompilerOptions.FAST_RELAXED_MATH).build();
}
rebuild = false;
for (int i = 0; i < kernels.length; i++) {