Skip to content

ParallelContext

Under Construction

This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/alpenglow/blob/main/js/parallel/ParallelContext.ts for the most up-to-date information.

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>

Type BaseWorkgroupValues

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

Record<string, ParallelWorkgroupArray<unknown> | number>

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)

Source Code

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