fearless_simd/
impl_macros.rs1#![allow(
7 unused_macros,
8 unused_imports,
9 reason = "Not all macros will be used by all implementations"
10)]
11
12macro_rules! delegate {
14 ( $prefix:path : $(
15 $(#[$attr: meta])*
16 $(unsafe $($placeholder: lifetime)?)?
17 fn $func: ident $(<$(const $generic: ident: $generic_ty: ty),* $(,)?>)?(
18 $($arg: ident: $ty: ty),* $(,)?
19 ) $(-> $ret: ty)?;
20 )*) => {
21 $(
22 #[doc=concat!("See [`", stringify!($prefix), "::", stringify!($func), "`].")]
23 $(#[$attr])*
24 #[inline(always)]
25 pub $(unsafe $($placeholder)?)?
26 fn $func $(<$(const $generic: $generic_ty),*>)?(self, $($arg: $ty),*) $(-> $ret)? {
27 unsafe { $func $(::<$($generic,)*>)?($($arg,)*) }
28 }
29 )*
30 };
31}
32pub(crate) use delegate;