macro_rules! impl_vecmap {
($name:ident, $name_to:ident, $name_elem:ident, $expr:expr) => { ... };
}Expand description
Generates a mapping kernel in three variants:
$name_to- Zero-allocation canonical implementation, writes to caller’s buffer$name- Allocates internally, delegates to$name_to$name_elem- Element-wisefn(f64) -> f64for kernel fusion
The _to variant is for pre-allocated parallel execution where each chunk
writes directly to its slice of a shared output buffer.
The _elem variant is for kernel fusion where multiple operations are composed
into a single loop, keeping intermediate values in registers instead of memory.
$name – allocating function name
$name_to – zero-allocation function name
$name_elem – element-wise function for fusion
$expr – expression mapping a scalar f64 -> f64