title: Copy from one memory to another skipping constant bytes in C
body: <p>I am working on embedded system application. I want to copy from source to destination, skipping constant number of bytes. For example: <code>source[6] = {0,1,2,3,4,5}</code> and I want destination to be {0,2,4} skipping one byte. Unfortunately <code>memcpy</code> could not fulfilled my requirement. How can I achieve this in 'C' without using loop as I have large data to process and using loop experiences time overhead.</p>
  
  <p>My current implementation is something like this which takes upto 5-6 milli-seconds for 1500 bytes to copy:</p>
  
  <pre><code>unsigned int len_actual = 1500; 
  /* Fill in the SPI DMA buffer. */
   while (len_actual-- != 0) 
  {
  *(tgt_handle-&gt;spi_tx_buff ++) = ((*write_irp-&gt;buffer ++)) | (2 &lt;&lt; 16) | DSPI_PUSHR_CONT; 
  }
  </code></pre>