Class: Kumi::IR::Loop::Ops::AccInit

Inherits:
Node show all
Defined in:
lib/kumi/ir/loop/ops/core_ops.rb

Instance Attribute Summary

Attributes inherited from Base::Instruction

#attributes, #axes, #dtype, #effects, #inputs, #metadata, #opcode, #result

Instance Method Summary collapse

Methods inherited from Node

opcode, #to_h

Methods inherited from Base::Instruction

#control_effect?, #defs, #effectful?, #io_effect?, #memory_effect?, #normalized_attributes, #printer_attributes, #printer_axes, #printer_dtype, #produces?, #stamp, #state_effect?, #to_h, #to_print_string, #uses, #validate!, #value_signature, #with_metadata

Constructor Details

#initialize(fn:, init:, nil_init:, **kwargs) ⇒ AccInit

Returns a new instance of AccInit.



158
159
160
161
162
163
164
165
# File 'lib/kumi/ir/loop/ops/core_ops.rb', line 158

def initialize(fn:, init:, nil_init:, **kwargs)
  super(
    inputs: [],
    attributes: { fn: fn.to_sym, init: init, nil_init: nil_init },
    effects: [Base::Effects::STATE],
    **kwargs
  )
end