2 ms·
CUDA has support for complex numbers and some NVIDIA frameworks use and expose it (https://nvidia.github.io/cccl/thrust/api/structthrust_1_1complex.html#_CPPv4I
by LegNeato 2y ago
CUDA has support for complex numbers and some NVIDIA frameworks use and expose it (https://nvidia.github.io/cccl/thrust/api/structthrust_1_1complex.html#_CPPv4I0EN6thrust7complexE https://nvidia.github.io/cccl/thrust/api/structthrust_1_1com...).
For Rust GPU, nothing built in but there are libraries like https://github.com/rust-num/num-complex https://github.com/rust-num/num-complex that support `no_std` and should work on the GPU. I've never used them so I don't know what (if any) the perf hit would be.