pub fn poly_roots_backend_for(
requested: ComputeBackend,
n: usize,
) -> ComputeBackendExpand description
The ComputeBackend the closed-form polynomial kernels would actually use
for n equations if asked for requested — without running anything.
The polynomial counterpart of root_batch_backend_for, differing only in
using the POLY_ROOTS_MIN_EQUATIONS size floor.
§Arguments
requested— the backend a caller would pass tocubic_roots_batchand friends.n— the number of equations in the batch, dimensionless.
§Returns
Either ComputeBackend::Serial or ComputeBackend::CpuMulti.
§Example
use outram_foam_basic_lib::compute::ComputeBackend;
use outram_foam_basic_lib::math::parallel::poly_roots_backend_for;
assert_eq!(poly_roots_backend_for(ComputeBackend::CpuMulti, 64), ComputeBackend::Serial);
assert_eq!(poly_roots_backend_for(ComputeBackend::Serial, 1 << 20), ComputeBackend::Serial);