Skip to content

Executor

Overview

TODO: doc

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

Class Executor

import { Executor } from 'scenerystack/alpenglow';

Constructor

new Executor( deviceContext : DeviceContext, encoder : GPUCommandEncoder, bufferLogger : BufferLogger, providedOptions? : ExecutorOptions )

Instance Methods

getComputePass( name : string ) : ComputePass

setTypedBufferValue( typedBuffer : TypedBuffer<T>, value : T )

getTypedBufferValue( typedBuffer : TypedBuffer<T> ) : Promise<T>

arrayBuffer( buffer : GPUBuffer ) : Promise<ArrayBuffer>

u32( buffer : GPUBuffer ) : Promise<Uint32Array>

i32( buffer : GPUBuffer ) : Promise<Int32Array>

f32( buffer : GPUBuffer ) : Promise<Float32Array>

u32Numbers( buffer : GPUBuffer ) : Promise<number[]>

i32Numbers( buffer : GPUBuffer ) : Promise<number[]>

f32Numbers( buffer : GPUBuffer ) : Promise<number[]>

Static Methods

execute( deviceContext : DeviceContext, task : ( executor: Executor ) => Promise<T>, options? : ExecutorOptions ) : Promise<T>

Type ExecutorOptions

import type { ExecutorOptions } from 'scenerystack/alpenglow';
  • getTimestampWrites?: ( name: string ) => GPUComputePassTimestampWrites | null
  • logBuffer?: GPUBuffer | null

Source Code

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