Locality Transformations of Computation and Data for Portable Performance