Skip to main content

expand

Function expand 

Source
pub fn expand<F: Float + CubeElement + LaunchArg>(
    scope: &Scope,
    input: &<[F] as CubeType>::ExpandType,
    output: &mut <[F] as CubeType>::ExpandType,
    floor: <F as CubeType>::ExpandType,
    op: u32,
)
Expand description

One function of each sample (op, fixed at compile time): 0 |x|, 1 x², 2 √max(x, 0), 3 log₁₀ max(|x|, floor).