license import { ENGINE } from '../engine' ; import { Cumsum , CumsumAttrs , CumsumInputs } from '../kernel_names' ; import { NamedAttrMap } from '../kernel_registry' ; import { Tensor } from '../tensor' ; import { NamedTensorMap } from '../tensor_types' ; import { convertToTensor } from '../tensor_util_env' ; import { TensorLike } from '../types' ; import { op } from './operation' ; param x param axis param exclusive param reverse doc function cumsum_ < T extends Tensor > ( x , axis = 0 , exclusive = false , reverse = false ) { const $x = convertToTensor ( x , 'x' , 'cumsum' ) ; const inputs = { x : $x } ; const attrs = { axis , exclusive , reverse } ; return ENGINE . runKernel ( Cumsum , inputs as { } as NamedTensorMap , attrs as { } as NamedAttrMap ) ; } export const cumsum = op ( { cumsum_ } ) ;