Six ways to implement spectrally accurate vector divergence on CPUs and GPUs