UNPKG

@hoff97/tensor-js

Version:

PyTorch like deep learning inferrence library

26 lines (25 loc) 1.03 kB
import { DTypeGpu, GPUTensorConstructor, GPUTensorI } from '../../../tensor/gpu/interface'; import { GPUMemoryAllocator } from '../../../tensor/gpu/memory'; import { Operation } from '../operation'; export interface CopyInfo { shapeX?: readonly number[]; widthX?: number; heightX?: number; shapeOutput?: readonly number[]; widthOutput?: number; heightOutput?: number; } export interface CopyInput { input: GPUTensorI; outputShape?: readonly number[]; } export declare class CopyOperation<GPUTensor extends GPUTensorI> extends Operation<GPUTensor, CopyInfo, CopyInput> { constructor(tensorConstructor: GPUTensorConstructor<GPUTensor>, dtype: DTypeGpu, allocator?: GPUMemoryAllocator); getFragmentShader(info: CopyInfo): string; getTextureNames(): string[]; calc(input: CopyInput): GPUTensor; getOutputShape(input: CopyInput): readonly number[]; compile(info: CopyInfo): void; getCompilationInfo(input: CopyInput): CopyInfo; getInputInfoString(input: CopyInput): string; }