Class: Kumi::IR::Loop::Lower::Carrier

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/ir/loop/lower.rb

Overview

How one axis’s loop gets its source array (“carrier”) when opened. ‘kind` names the strategy; only the fields that kind uses are set:

:root   — a top-level array, navigated from the input root.
          uses head_path.
:nested — an array under a parent element; navigated from the
          parent's element via field keys. uses parent + between.
:cross  — re-iterates the surrounding array (A × A') under a fresh
          inner index. uses head_path + source_axis.
:outer  — re-iterates a DIFFERENT root array (A × B) under a fresh
          inner index. uses head_path + source_axis.

:root/:cross/:outer all open from head_path; :nested opens from its parent element. open_axis dispatches on ‘kind`.

Instance Attribute Summary collapse

Instance Attribute Details

#betweenObject

Returns the value of attribute between

Returns:

  • (Object)

    the current value of between



79
80
81
# File 'lib/kumi/ir/loop/lower.rb', line 79

def between
  @between
end

#head_pathObject

Returns the value of attribute head_path

Returns:

  • (Object)

    the current value of head_path



79
80
81
# File 'lib/kumi/ir/loop/lower.rb', line 79

def head_path
  @head_path
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



79
80
81
# File 'lib/kumi/ir/loop/lower.rb', line 79

def kind
  @kind
end

#parentObject

Returns the value of attribute parent

Returns:

  • (Object)

    the current value of parent



79
80
81
# File 'lib/kumi/ir/loop/lower.rb', line 79

def parent
  @parent
end

#source_axisObject

Returns the value of attribute source_axis

Returns:

  • (Object)

    the current value of source_axis



79
80
81
# File 'lib/kumi/ir/loop/lower.rb', line 79

def source_axis
  @source_axis
end