class Ikra::Types::LocationAwareFixedSizeArrayType
Attributes
dimensions[R]
Public Class Methods
new(inner_type, dimensions, location: :device)
click to toggle source
# File lib/types/types/array_type.rb, line 97 def new(inner_type, dimensions, location: :device) if @cache == nil @cache = {} @cache.default_proc = Proc.new do |hash, key| hash[key] = new_original(*key) end end return @cache[[inner_type, location, dimensions]] end
new(inner_type, location, dimensions)
click to toggle source
Calls superclass method
Ikra::Types::LocationAwareArrayType::new
# File lib/types/types/array_type.rb, line 111 def initialize(inner_type, location, dimensions) super(inner_type, location) @dimensions = dimensions end
Public Instance Methods
to_command()
click to toggle source
# File lib/types/types/array_type.rb, line 116 def to_command # No fusion possible here. The first parameter (target) is a reference to the # array command struct representing the [ArrayInHostSectionCommand]. # TODO: The code depends on the template (variable name `cmd` and `input_0`). return Symbolic::FixedSizeArrayInHostSectionCommand.new( "((#{@inner_type.to_c_type} *) cmd->input_0)", @inner_type, @dimensions) end