title: store elements of a vector into another vector
body: <p>I have a vector of 16997*15931*6 elements. You know this is the different bands of a raster that have been read by RasterIO function of the GDAL library.Now I want to store the elements into a 2d vector that have six elements(rows) and each row will contain 16997*15931 elements. I know that I can have a loop iterating 16997*15931*6 and evaluate i%6:  </p>
  
  <pre><code>vector&lt;vector&lt;unsigned char&gt; &gt; bands(6,vector&lt;unsigned char&gt;)
  for(i=0;i&lt;(6*16997*15931);i++)
     bands[i%6].pushback(data.at(i));  
  </code></pre>
  
  <p>But since I'm working with high resolution .tiff images, I need codes with high performance. so any faster algorithm will be welcomed.<br>
  thanks</p>