import '../../../assert/js/assert.js';
import '../../../globals.js';
/**
 * Represents a storage-level array.
 *
 * We need to track which execution threads/invocations have written to which indices, so that we can (a) ensure that
 * we won't get data races (and will have uniform control flow), and (b) in the future potentially simulate cases where
 * we might get more undefined-like behavior between which values we get.
 *
 * For storage-level arrays, we'll need to track (a) which workgroup, and (b) which local invocation within that
 * workgroup wrote to that index. When a workgroup synchronizes with storageBarrier(), it will ONLY synchronize the
 * actions that THAT SPECIFIC workgroup has done, and will leave the records of modifications from others alone.
 *
 * TODO: for NOW, we'll lock out and fail on reads (if another thread wrote), OR multiple-thread writes, HOWEVER
 * TODO: we should make it possible to return arbitrary results (and track values) for other cases
 *
 * See ParallelExecutor for more high-level documentation.
 *
 * @author Jonathan Olson <jonathan.olson@colorado.edu>
 */
import Vector3 from '../../../dot/js/Vector3.js';
import { BaseWorkgroupValues, ParallelContext } from '../imports.js';
export default class ParallelStorageArray<T> {
    readonly data: T[];
    readonly indeterminateValue: T;
    private readonly writeLocalIDs;
    constructor(data: T[], indeterminateValue: T);
    get<WorkgroupValues extends BaseWorkgroupValues>(context: ParallelContext<WorkgroupValues>, index: number): Promise<T>;
    set<WorkgroupValues extends BaseWorkgroupValues>(context: ParallelContext<WorkgroupValues>, index: number, value: T): Promise<void>;
    synchronize(workgroupId: Vector3): void;
    synchronizeFull(): void;
}
//# sourceMappingURL=ParallelStorageArray.d.ts.map