Opencl in ImageMagick
<p>I installed ImageMagick using the instructions as below</p>

<blockquote>
  <p>export C_INCLUDE_PATH=/usr/local/cuda/include </p>
  
  <p>export LD_LIBRARY_PATH=/usr/local/cuda/lib64</p>
  
  <p>./configure --prefix=/usr --enable-shared --enable-openmp --enable-opencl --without-dps --without-djvu --without-fftw --without-fpx --without-gslib --without-gvc  </p>
  
  <p>make </p>
  
  <p>sudo make install</p>
</blockquote>

<p>While checking the imageMagick installation using</p>

<blockquote>
  <p>identify --version</p>
</blockquote>

<p>It is showing as, </p>

<blockquote>
  <p>Version: ImageMagick 7.0.0-0 Q16 x86_64 2016-04-06
  <a href="http://www.imagemagick.org" rel="nofollow">http://www.imagemagick.org</a> Copyright: Copyright (C) 1999-2016
  ImageMagick Studio LLC License:
  <a href="http://www.imagemagick.org/script/license.php" rel="nofollow">http://www.imagemagick.org/script/license.php</a> Features: Cipher DPC
  HDRI OpenCL OpenMP  Delegates (built-in): bzlib fontconfig freetype
  jbig jng jpeg lcms lqr lzma openexr pangocairo png tiff wmf x xml zlib</p>
</blockquote>

<p>When I check the device benchmark file as this :</p>

<pre><code>$ cat ~/.cache/ImageMagick/ImagemagickOpenCLDeviceProfile
</code></pre>

<p>it shows</p>

<pre><code>&lt;version&gt;ImageMagick Device Selection v0.9&lt;/version&gt;
&lt;device&gt;&lt;type&gt;&lt;/type&gt;&lt;name&gt;Quadro M6000&lt;/name&gt;&lt;driver&gt;352.79&lt;/driver&gt;&lt;max cu&gt;24&lt;/max cu&gt;&lt;max clock&gt;1114&lt;/max clock&gt;&lt;score&gt;0.0960&lt;/score&gt;&lt;/device&gt;
&lt;device&gt;&lt;type&gt;&lt;/type&gt;&lt;score&gt;1.1890&lt;/score&gt;&lt;/device&gt;
</code></pre>

<p>But when i run the command </p>

<blockquote>
  <p>time convert /home/downloads/lan.jpg -convolve '-1, -1, -1, -1, 9, -1, -1, -1, -1' /home/downloads/convolve.png</p>
</blockquote>

<p>I got the output as</p>

<blockquote>
  <p>real  0m1.077s user   0m3.072s sys    0m0.032s</p>
</blockquote>

<p>In OpenMP i got the output as </p>

<blockquote>
  <p>real  0m0.946s user   0m3.096s sys    0m0.036s</p>
</blockquote>

<p>When i worked with the convert binary file inside the package, </p>

<blockquote>
  <p>./convert /home/zlabs/lan.jpg -convolve '-1, -1, -1, -1, 9, -1, -1, -1, -1' /home/zlabs/convolve.png</p>
</blockquote>

<p>i got</p>

<blockquote>
  <p>real  0m0.904s user   0m1.824s sys    0m0.024s</p>
</blockquote>

<p>Actually the binary file is giving actual performance of opencl. How is it possible? What is happening actually? Is Opencl working or not?</p>