Hi,
I have on large threedimensiona l array
int largeArray[1024][64][4];
In a particular function I only need a part of this array
So I'm using a new variable and assign it the follwoing way:
int (*smallArray)[64][4];
smallArray = &largeArray[42];
Is the following code correct if I want to get the value of an element ?
int x = smallArray[0][0];
Is there a performance difference between retriveing many elements of the
small and the large array in my function ?
Thanks,
Frank
I have on large threedimensiona l array
int largeArray[1024][64][4];
In a particular function I only need a part of this array
So I'm using a new variable and assign it the follwoing way:
int (*smallArray)[64][4];
smallArray = &largeArray[42];
Is the following code correct if I want to get the value of an element ?
int x = smallArray[0][0];
Is there a performance difference between retriveing many elements of the
small and the large array in my function ?
Thanks,
Frank
Comment