title: OpenCL computation times much longer than CPU alternative
body: <p>I'm taking my first steps in OpenCL (and CUDA) for my internship. All nice and well, I now have working OpenCL code, but the computation times are way too high, I think. My guess is that I'm doing too much I/O, but I don't know where that could be.</p>
  
  <p>The code is for the main: <a href="http://pastebin.com/i4A6kPfn" rel="nofollow">http://pastebin.com/i4A6kPfn</a>, and for the kernel: <a href="http://pastebin.com/Wefrqifh" rel="nofollow">http://pastebin.com/Wefrqifh</a> I'm starting to measure time after <code>segmentPunten(segmentArray, begin, eind);</code> has returned, and I end measuring time after the last <code>clEnqueueReadBuffer</code>. </p>
  
  <p>Computation time on a Nvidia GT440 is 38.6 seconds, on a GT555M 35.5, on a Athlon II X4 5.6 seconds, and on a Intel P8600 6 seconds.</p>
  
  <p>Can someone explain this to me? Why are the computation times are so high, and what solutions are there for this?</p>
  
  <p>What is it supposed to do: (short version) to calculate how much noiseload there is made by an airplane that is passing by.</p>
  
  <p>long version: there are several Observer Points (OP) wich are the points in wich sound is measured from an airplane thas is passing by. The flightpath is being segmented in 10.000 segments, this is done at the function segmentPunten. The double for loop in the main gives OPs a coordinate. There are two kernels. The first one calculates the distance from a single OP to a single segment. This is then saved in the array "afstanden". The second kernel calculates the sound load in an OP, from all the segments.</p>