scanComprehensiveWGSL¶
Overview¶
All of the needed logic for a raked workgroup scan (including the logic to load and store the data).
@author Jonathan Olson <jonathan.olson@colorado.edu>
Type scanComprehensiveWGSLOptions¶
- input: WGSLVariableName
varname of input var<storage> array<{valueType}> - output: WGSLVariableName
varname of output var<storage> array<{valueType}> (can be the same as the input) - scratch: WGSLVariableName
varname of output var<workgroup> array<${valueType}, ${workgroupSize * grainSize}> - binaryOp: BinaryOp<T>
- exclusive?: boolean
- getAddedValue?: ( ( varName: WGSLVariableName ) => WGSLStatements ) | null
null | ( varName ) => statements - should write a value to be added to everything into the specific variable name This is designed to be used for multi-level scans, where you essentially want to add an "offset" value to everything in the workgroup. - & RakedSizable & OptionalLengthExpressionable & GlobalIndexable & WorkgroupIndexable & LocalIndexable & Pick<scanRakedWGSLOptions<T>, "storeReduction" | "stripeReducedOutput" | "addedValueNeedsWorkgroupBarrier"> & Pick<loadMultipleWGSLOptions<T>, "factorOutSubexpressions" | "inputOrder" | "inputAccessOrder">
Source Code¶
See the source for scanComprehensiveWGSL.ts in the alpenglow repository.