4 ms·
Here's a nice example of the curve to index transpose in a well established codebase: https://github.com/SchedMD/slurm/blob/abebf13e9009831376a2d7514e38ed83be8
by fintler 2y ago
Here's a nice example of the curve to index transpose in a well established codebase:
https://github.com/SchedMD/slurm/blob/abebf13e9009831376a2d7514e38ed83be86f0ac/src/plugins/topology/3d_torus/hilbert.c https://github.com/SchedMD/slurm/blob/abebf13e9009831376a2d7...
It greatly simplifies the job scheduler to cluster across index instead of some n-dimensional space when calculating placement in the cluster. Consider that each server in the cluster has multiple connections to other servers which all form a sort of hypercube with the Hilbert curve conceptually drawn inside it.
It also shows how simple the transpose operation can be. It's just a few loops and bit shifts.