2D cache-based structures and space-filling curves

I read that space-filling curves, such as the Peano curve , are useful for supporting cache-resistant data structures in a linear address space, as they support physical spatial locality.

However, I am not sure how to use them. Do any of these curves have formulas for quickly translating a linear address into coordinates (x, y) and vice versa? Otherwise, how to determine where in the memory to look when searching for a specific pair of coordinates? An example will be very helpful.

+1
source share
1 answer

As indicated in the comment, translate the coordinate into binary and alternate it. Then process it with a base-4 number if you want a quad-core keyboard.

+1
source

Source: https://habr.com/ru/post/1606702/


All Articles