UNPKG

@hoff97/tensor-js

Version:

PyTorch like deep learning inferrence library

22 lines (21 loc) 933 B
import { DTypeGpu, GPUTensorConstructor, GPUTensorI } from '../../../tensor/gpu/interface'; import { GPUMemoryAllocator } from '../../../tensor/gpu/memory'; import { Input } from '../operation'; import { BinaryOperation, BinaryOpInfo, BinaryOpInput } from './binaryOperation'; export interface AddInfo extends BinaryOpInfo { alpha?: number; beta?: number; } export interface AddInput extends BinaryOpInput { alpha: number; beta: number; } export declare class AddOperation<GPUTensor extends GPUTensorI> extends BinaryOperation<GPUTensor, AddInfo, AddInput> { constructor(tensorConstructor: GPUTensorConstructor<GPUTensor>, dtype: DTypeGpu, allocator?: GPUMemoryAllocator); getOp(a: string, b: string): string; calc(input: AddInput): GPUTensor; getVariables(): string; getUniformAttrs(): Input[]; getCompilationInfo(input: AddInput): AddInfo; getInputInfoString(input: AddInput): string; }