Class: Kumi::RegistryV2::Function

Inherits:
Struct
  • Object
show all
Defined in:
lib/kumi/registry_v2.rb

Overview

— NEW: Define the Function struct —

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases

Returns:

  • (Object)

    the current value of aliases



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def aliases
  @aliases
end

#dtypeObject

Returns the value of attribute dtype

Returns:

  • (Object)

    the current value of dtype



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def dtype
  @dtype
end

#expandObject

Returns the value of attribute expand

Returns:

  • (Object)

    the current value of expand



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def expand
  @expand
end

#folding_class_methodObject

Returns the value of attribute folding_class_method

Returns:

  • (Object)

    the current value of folding_class_method



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def folding_class_method
  @folding_class_method
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def id
  @id
end

#kindObject

Returns the value of attribute kind

Returns:

  • (Object)

    the current value of kind



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def kind
  @kind
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def options
  @options
end

#paramsObject

Returns the value of attribute params

Returns:

  • (Object)

    the current value of params



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def params
  @params
end

#reduction_strategyObject

Returns the value of attribute reduction_strategy

Returns:

  • (Object)

    the current value of reduction_strategy



14
15
16
# File 'lib/kumi/registry_v2.rb', line 14

def reduction_strategy
  @reduction_strategy
end

Instance Method Details

#dtype_ruleObject



24
25
26
# File 'lib/kumi/registry_v2.rb', line 24

def dtype_rule
  @dtype_rule ||= Loader.build_dtype_rule_from_yaml(dtype)
end

#elementwise?Boolean

Returns:

  • (Boolean)


18
# File 'lib/kumi/registry_v2.rb', line 18

def elementwise? = kind == :elementwise

#param_namesObject



20
21
22
# File 'lib/kumi/registry_v2.rb', line 20

def param_names
  @param_names ||= params.map { |p| p["name"].to_sym }
end

#reduce?Boolean

Returns:

  • (Boolean)


16
# File 'lib/kumi/registry_v2.rb', line 16

def reduce? = kind == :reduce

#select?Boolean

Returns:

  • (Boolean)


17
# File 'lib/kumi/registry_v2.rb', line 17

def select? = id == SELECT_ID