title: Copying a GpuMat row to a std::vector
body: <p>How can I transfer cv::gpu::GpuMat rows to std::vector with as little as possible copy operations?</p>
  
  <p>The fastest way I can think of is:</p>
  
  <pre><code>GpuMat fooGpu(numRows, numCols, CV_32FC1);
  Mat foo = fooGpu;
  
  Mat fooRow = foo.row(i);
  
  std::vector&lt;float&gt; vec;
  vec.resize(numCols);
  
  memcpy(&amp;vec[0], fooRow.data, sizeof(float)*numCols);
  </code></pre>
  
  <p>But I'm not even sure if this works, because the fooRow content would have to be aligned...</p>
  
  <p>Is there another (better) way to do it?</p>