Skip to content

ParallelContext

Overview

Contains all the data/methods needed by a kernel to run in parallel. Passed to the kernel execution function, so that it can make equivalent calls similar to the WGPU calls.

See ParallelExecutor for more high-level documentation.

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

Class ParallelContext

import { ParallelContext } from 'scenerystack/alpenglow';

Constructor

new ParallelContext( kernel : ParallelKernel<WorkgroupValues>, localId : Vector3, workgroup : ParallelWorkgroup<WorkgroupValues>, executor : ParallelExecutor<WorkgroupValues> )

Instance Methods

start() : Promise<void>

To be called from within the kernel execution function

workgroupBarrier() : Promise<void>

To be called from within the kernel execution function

storageBarrier() : Promise<void>

To be called from within the kernel execution function

afterSet() : Promise<void>

TODO: workgroupUniformLoad To be called from within the kernel execution function

afterGet() : Promise<void>

To be called from within the kernel execution function

Instance Properties

globalId : Vector3

(readonly)

localIndex : number

(readonly)

workgroupId : Vector3

(readonly)

workgroupValues : WorkgroupValues

(readonly)

Type BaseWorkgroupValues

import type { BaseWorkgroupValues } from 'scenerystack/alpenglow';

Record<string, ParallelWorkgroupArray<unknown> | number>

Source Code

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