Class: Kumi::IR::Loop::Ops::AccStep
- Inherits:
-
Node
- Object
- Base::Instruction
- Node
- Kumi::IR::Loop::Ops::AccStep
- 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
- #acc ⇒ Object
-
#initialize(acc:, value:, fn:, nil_init:, **kwargs) ⇒ AccStep
constructor
A new instance of AccStep.
- #value ⇒ Object
Methods inherited from Node
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(acc:, value:, fn:, nil_init:, **kwargs) ⇒ AccStep
Returns a new instance of AccStep.
171 172 173 174 175 176 177 178 |
# File 'lib/kumi/ir/loop/ops/core_ops.rb', line 171 def initialize(acc:, value:, fn:, nil_init:, **kwargs) super( inputs: [acc, value], attributes: { fn: fn.to_sym, nil_init: nil_init }, effects: [Base::Effects::STATE], **kwargs ) end |
Instance Method Details
#acc ⇒ Object
180 |
# File 'lib/kumi/ir/loop/ops/core_ops.rb', line 180 def acc = inputs[0] |
#value ⇒ Object
181 |
# File 'lib/kumi/ir/loop/ops/core_ops.rb', line 181 def value = inputs[1] |