dimanche 23 février 2014

[Help] For-Loops with arrays topic




Hi guys,

I wanted to know was there any other way to optimize or speed up my loop, i did try to increase the values by 2, 3 but it makes my results not accurate.

See I'm using this to read though some buffers that are like 1000 x 1000


Code:


char a[1280];
char b[1024];
int i, j;
int nImageWidth = 1280;
int nImageHeight = 1024;

for( i = 0; i < nImageHeight; i += 2 )
{
    for( j = 0; j < nImageWidth; j += 2 )
    {
        a[j] = resultsA;
        b[i] = resultsB;
    }
}


So, Is there away to use memcpy() or something to speed this up or is I'm just screwed? Thanks in advance.





Aucun commentaire:

Enregistrer un commentaire