Skip to main content

reduce

Function reduce 

Source
pub fn reduce<T: RudaPrimitive, O: RudaBinaryOp<T>>(
    input: &Array<T>,
    scratch: &mut SharedMemory<T>,
    op: &O,
    valid_items: usize,
    threads: usize,
    items_per_thread: usize,
) -> T
Expand description

Ordered tree reduction; the aggregate is broadcast to all block threads. valid_items must be positive. Input is in blocked register order.