How I see it. If you have:
float cndGPU(float d) {
const float a = 1;
const float b = 2;
float c;
c = a + b + arr[d];
return c;
}
- Checking compute time without memory access - literally write all your computing expressions into one and without using variables:
return 1 + 2 + 3; //just put some number that can be in arr[d]
- Checking the memory access - literally the opposite:
`
const float a = 1;
const float b = 2;
float c;
c = arr[d]; //here we have our memory access
return c;