Skip to content

mainReduceWGSL

Overview

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

Type mainReduceWGSLOptions

import type { mainReduceWGSLOptions } from 'scenerystack/alpenglow';
  • input: BufferSlot<T[]>
  • output: BufferSlot<T[]>
  • binaryOp: BinaryOp<T>
    TODO: should we really have lengthExpression in loadReducedOptions? Also inputOrder options?!?
  • stripeOutput?: boolean
    We can stripe the output (so the next layer of reduce can read it as striped)
  • convergentRemap?: boolean
    Whether we should remap the data to convergent indices before reducing (i.e. a convergent reduce with non-commutative data.
  • loadReducedOptions?: StrictOmit<loadReducedWGSLOptions<T>, "value" | "binaryOp" | "loadExpression" | "loadStatements" | "workgroupSize" | "grainSize" | "globalIndex" | "workgroupIndex" | "localIndex">
    e.g. lengthExpression / inputOrder / inputAccessOrder / sequentialReduceStyle
  • reduceOptions?: StrictOmit<reduceWGSLOptions<T>, "value" | "scratch" | "workgroupSize" | "binaryOp" | "localIndex" | "scratchPreloaded" | "valuePreloaded" | "mapScratchIndex">
    e.g. convergent
  • & RakedSizable

Source Code

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