title: Parallel GPU computing using OpenCV
body: <p>I have an application that requires processing multiple images in parallel in order to maintain real-time speed.</p>
  
  <p>It is my understanding that I cannot call OpenCV's GPU functions in a multi-threaded fashion on a single CUDA device. I have tried an OpenMP code construct such as the following:</p>
  
  <pre><code>#pragma omp parallel for
  for(int i=0; i&lt;numImages; i++){
      for(int j=0; j&lt;numChannels; j++){
          for(int k=0; k&lt;pyramidDepth; k++){
              cv::gpu::multiply(pyramid[i][j][k], weightmap[i][k], pyramid[i][j][k]);
          }
      }
  }
  </code></pre>
  
  <p>This seems to compile and execute correctly, but unfortunately it appears to execute the numImages threads serially on the same CUDA device.</p>
  
  <p>I should be able to execute multiple threads in parallel if I have multiple CUDA devices, correct? In order to get multiple CUDA devices, do I need multiple video cards?</p>
  
  <p>Does anyone know if the nVidia GTX 690 dual-chip card works as two independent CUDA devices with OpenCV 2.4 or later? I found confirmation it can work as such with OpenCL, but no confirmation with regard to OpenCV.</p>