macro_rules! select_implementation {
(
name: $fn_name:ident,
// Configuration meta for when to use arch-specific implementation that requires hard
// float ops
$( use_arch: $use_arch:meta, )?
// Configuration meta for when to use the arch module regardless of whether softfloats
// have been requested.
$( use_arch_required: $use_arch_required:meta, )?
args: $($arg:ident),+ ,
) => { ... };
(@cfg ; $ex:expr) => { ... };
(@cfg $provided:meta; $ex:expr) => { ... };
}
Expand description
Choose between using an arch-specific implementation and the function body. Returns directly if the arch implementation is used, otherwise continue with the rest of the function.
Specify a use_arch
meta field if an architecture-specific implementation is provided.
These live in the math::arch::some_target_arch
module.
Specify a use_arch_required
meta field if something architecture-specific must be used
regardless of feature configuration (force-soft-floats
).
The passed meta options do not need to account for the arch
target feature.