space-filling-curve

2D cache-friendly data structures and space-filling curves

╄→гoц情女王★ 提交于 2020-01-23 16:45:48
问题 I've read that space-filling curves such as the Peano curve are useful for maintaining cache-friendly data structures in a linear address space, since they maintain physical spatial locality. However, I'm not sure how to actually use them. Do any of these curves have formulas for quickly translating a linear address into (x,y) coordinates and vice-versa? Otherwise, how do I determine where in memory to look when looking up a certain pair of coordinates? An example would be very helpful. 回答1: