OpenCL double precision not working
<p>So I have a project that I created on Mac Pro using double data type and it works perfect. Now I moved my project to MacBook Air and it started giving me</p>

<pre><code>Exception
ERROR: clBuildProgram(-11)
</code></pre>

<p>error. Now the reason for this is that my MacBook Air does not support the double precision type with OpenCL. But on the contrary, I found this: OpenCL kernel error on Mac OSx. I applied the method in the answer like this:</p>

<pre><code>cl_device_fp_config cfg;
clGetDeviceInfo(devicesIds[0], CL_DEVICE_DOUBLE_FP_CONFIG, sizeof(cfg), &amp;cfg, NULL); // 0 is for the device number I guess?
printf("Double FP config = %llu\n", cfg);
</code></pre>

<p>And he explained that if the result is 0, then it means that double precision is not supported. But I get this result:</p>

<pre><code>Double FP config = 63
</code></pre>

<p>I also tried this method:</p>

<pre><code>if (!cfg) {
    printf("Double precision not supported \n\n");
} else {
  printf("Following double precision features supported:\n");

  if(cfg &amp; CL_FP_INF_NAN)
      printf("  INF and NaN values\n");

  if(cfg &amp; CL_FP_DENORM)
      printf("  Denormalized numbers\n");

  if(cfg &amp; CL_FP_ROUND_TO_NEAREST)
      printf("  Round To Nearest Even mode\n");

  if(cfg &amp; CL_FP_ROUND_TO_INF)
      printf("  Round To Infinity mode\n");

  if(cfg &amp; CL_FP_ROUND_TO_ZERO)
      printf("  Round To Zero mode\n");

  if(cfg &amp; CL_FP_FMA)
      printf("  Floating-point multiply-and-add operation\n\n");
}
</code></pre>

<p>And I got the following results:</p>

<pre><code>Double FP config = 63
Following double precision features supported:
  INF and NaN values
  Denormalized numbers
  Round To Nearest Even mode
  Round To Infinity mode
  Round To Zero mode
  Floating-point multiply-and-add operation
</code></pre>

<p>What is going on here? Does my system support double precision with OpenCL or not? If yes, how do I enable and use it? If not, what are my alternatives?
Now I am very confused. First of all, I don't know if my MacBook Air supports double precision or not? Apparently it doesn't. But with the output, it seems like it does.</p>

<p>If it doesn't support double precision, then what should I do? Should I change everything in my project to float values? OR if it does, then how do I enable it? Because I followed a lot of tutorials and examples and none of them work. e.g. <a href="https://streamcomputing.eu/blog/2013-10-17/writing-opencl-code-single-double-precision/" rel="nofollow">https://streamcomputing.eu/blog/2013-10-17/writing-opencl-code-single-double-precision/</a> but none of them seem to work.</p>

<p>EDIT:</p>