gpu.c: compute mapping to shared/private memory tile up front