Skip to content

mainReduceAtomicWGSL

Overview

Meant for reduction on u32/i32 values (could be generalized to things that can be represented with multiple atomic values, haven't run into that yet).

@author Jonathan Olson <jonathan.olson@colorado.edu>

Type mainReduceAtomicWGSLOptions

import type { mainReduceAtomicWGSLOptions } from 'scenerystack/alpenglow';
  • input: BufferSlot<T[]>
  • output: BufferSlot<T>
  • binaryOp: BinaryOp<T>
  • loadReducedOptions?: StrictOmit<loadReducedWGSLOptions<T>, "value" | "binaryOp" | "loadExpression" | "loadStatements" | "workgroupSize" | "grainSize" | "globalIndex" | "workgroupIndex" | "localIndex">
    e.g. length / inputOrder / inputAccessOrder / sequentialReduceStyle
  • reduceOptions?: StrictOmit<reduceWGSLOptions<T>, "value" | "scratch" | "workgroupSize" | "binaryOp" | "localIndex" | "scratchPreloaded" | "valuePreloaded" | "mapScratchIndex">
  • & RakedSizable

Source Code

See the source for mainReduceAtomicWGSL.ts in the alpenglow repository.