I need to continuously fill an array of 16384 double elements from a device that is delivering an array of data that is 332 elements in length (these have a data type of short). Currently copying takes 28ms to fill the 16384 element array. I would like to get this under 10ms at least. In the following code the method getData returns two short arrays of 332 elements(iBuf and qBuf). This method takes 14 ticks (3uS) so is not relevant for speed.
getData();
while (keepGoing)
{
for (int i = 0; i < 16384; i++)
{
iData[i] = ibuf[rawCounter];
qData[i] = qbuf[rawCounter];
rawCounter++;
if (rawCounter == samplesPerPacket)
{
getData();
rawCounter = 0;
}
//processing of data occurs here
}
Thanks for any help and suggestions