Add support for benchmarking the compute magnitude function.