I couldn't move any of the work to the CPU and removing the `acos` using trig identities didn't improve the performance by much (and had some issues). I just added the conditional compilation like we discussed.