Can anyone suggest a fast method for copying a 1d array to a 2d array, I'm currently doing the following but seems slow and would like to speed it up some? Is it possible to use memcpy to do this same thing?
Code:buffer_p = malloc(MAX_CAPTURE_LENGTH); x = 0; for (j = 0; j < captureLength16; j+=2) { data_matrix[0][x] = *(buffer_p+j); data_matrix[1][x] = *(buffer_p+j+1); x++; }