Class: Kumi::IR::DF::Ops::LoadInput

Inherits:
Node show all
Defined in:
lib/kumi/ir/df/ops/load_input.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(key:, chain: [], source_plan: nil, plan_ref: nil, **kwargs) ⇒ LoadInput

Returns a new instance of LoadInput.



10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/kumi/ir/df/ops/load_input.rb', line 10

def initialize(key:, chain: [], source_plan: nil, plan_ref: nil, **kwargs)
  attrs = {
    key: key.to_sym,
    chain: Array(chain).map(&:to_s)
  }
  attrs[:source_plan] = source_plan if source_plan
  attrs[:plan_ref] = plan_ref if plan_ref
  super(
    inputs: [],
    attributes: attrs,
    **kwargs
  )
end

Instance Method Details

#chainObject



25
# File 'lib/kumi/ir/df/ops/load_input.rb', line 25

def chain = attributes[:chain]

#keyObject



24
# File 'lib/kumi/ir/df/ops/load_input.rb', line 24

def key = attributes[:key]

#plan_refObject



26
# File 'lib/kumi/ir/df/ops/load_input.rb', line 26

def plan_ref = attributes[:plan_ref]