license import { GPGPUProgram } from './gpgpu_math' ; import { UniformType } from './shader_compiler' ; export class FillProgram implements GPGPUProgram { variableNames : string [ ] ; outputShape : number [ ] = [ ] ; userCode : string ; customUniforms = [ { name : 'value' , type : 'float' as UniformType } ] ; constructor ( shape , value ) { this . variableNames = [ 'x' ] ; this . outputShape = shape ; this . userCode = `
      void main() {
        // Input can be obtained from uniform value.
        setOutput(value);
      }
    ` ; } }