columna API reference - v0.3.0
    Preparing search index...

    Class WebGpuBackend

    Implements

    • Backend
    Index
    capabilities: { gpuFriendlyOnly: boolean; minRows: number; name: "webgpu" }
    name: "webgpu"
    options: { lossyF32: boolean }

    lossyF32: true re-enables the approximate float32 path for f64 / datetime columns and for literals the column type cannot represent exactly. Off by default: the GPU must return the same rows as the CPU.

    • get initialised(): boolean

      True once detection has run (successfully or not).

      Returns boolean

    • ctx is optional for backward compatibility; backends that receive it should trace what they run.

      Parameters

      • plan: PlanNode
      • Optionalctx: ExecContext

      Returns Promise<TableView>

    • Multi-predicate AND filter over typed predicates (see prepareGpuFilterPredicate); columns stay resident.

      Parameters

      • predicates: GpuFilterPredicate[]

      Returns Promise<Uint32Array<ArrayBufferLike>>

    • Same as gpuFilterAnd with host↔device transfer and submit→readback timings split out.

      Parameters

      • predicates: GpuFilterPredicate[]

      Returns Promise<{ computeMs: number; mask: Uint32Array; transferMs: number }>

    • Parameters

      • values: Float32Array
      • op: number
      • literal: number

      Returns Promise<Float32Array<ArrayBufferLike>>

    • Parameters

      • values: Float32Array
      • op: number
      • literal: number

      Returns Promise<{ computeMs: number; transferMs: number; values: Float32Array }>

    • Parameters

      • values: Float32Array
      • Optionalmode: "sum" | "min" | "max"

      Returns Promise<number>

    • Parameters

      • values: Float32Array

      Returns Promise<number>

      use gpuReduce(..., 'sum')

    • Parameters

      Returns boolean

    • Request the adapter / device (once). Nothing talks to navigator.gpu before this is called — importing the library or constructing the backend has no side effects. init() in columna calls it.

      Returns Promise<boolean>