UNPKG

cuda.js

Version:

CUDA bindings for Node.js

19 lines 663 B
import { GpuBuffer } from './memory'; type Typed = Float32Array | Int32Array | Uint8Array | Float64Array; export declare class GpuArray<T extends Typed = Float32Array> { readonly buffer: GpuBuffer; readonly shape: number[]; readonly dtype: string; readonly size: number; constructor(shapeOrData: number[] | T, dtype?: string); upload(data: T): void; download(): T; fill(value: number): void; copy(): GpuArray<T>; add(other: GpuArray<T> | number): GpuArray<T>; multiply(other: GpuArray<T> | number): GpuArray<T>; get length(): number; get byteLength(): number; } export {}; //# sourceMappingURL=gpuarray.d.ts.map