Class: Ikra::Symbolic::FixedSizeArrayInHostSectionCommand
- Inherits:
-
ArrayInHostSectionCommand
- Object
- ArrayInHostSectionCommand
- Ikra::Symbolic::FixedSizeArrayInHostSectionCommand
- Includes:
- ArrayCommand
- Defined in:
- lib/symbolic/visitor.rb,
lib/symbolic/host_section.rb
Instance Attribute Summary collapse
-
#base_type ⇒ Object
Returns the value of attribute base_type.
-
#dimensions ⇒ Object
Returns the value of attribute dimensions.
-
#target ⇒ Object
Returns the value of attribute target.
Attributes included from ArrayCommand
#block, #block_size, #generator_node, #gpu_result_pointer, #input, #keep, #unique_id
Instance Method Summary collapse
- #==(other) ⇒ Object
- #accept(visitor) ⇒ Object
-
#initialize(target, base_type, dimensions, block_size: DEFAULT_BLOCK_SIZE) ⇒ FixedSizeArrayInHostSectionCommand
constructor
A new instance of FixedSizeArrayInHostSectionCommand.
- #size ⇒ Object
Methods included from ArrayCommand
#[], #block_def_node, #block_parameter_names, #command_binding, #command_translator_class, #each, #eql?, #execute, #externals, #has_previous_result?, #hash, #ikra_type, included, #lexical_externals, #pack, #post_execute, reset_unique_id, #result_type, #set_unique_id, #to_c_type, #to_command, #to_ffi_type, #to_ruby_type, #to_s, #with_index
Methods included from Types::RubyType
#class_id, #eql?, #hash, #inspect, #is_primitive?, #is_union_type?, #should_generate_self_arg?, #to_array_type, #to_c_type, #to_ruby_type, #to_str, #to_union_type
Methods included from ParallelOperations
#&, #*, #+, #-, #/, #<, #<=, #>, #>=, #^, #pcombine, #pmap, #preduce, #pstencil, #pzip, #|
Constructor Details
#initialize(target, base_type, dimensions, block_size: DEFAULT_BLOCK_SIZE) ⇒ FixedSizeArrayInHostSectionCommand
Returns a new instance of FixedSizeArrayInHostSectionCommand.
96 97 98 99 100 |
# File 'lib/symbolic/host_section.rb', line 96 def initialize(target, base_type, dimensions, block_size: DEFAULT_BLOCK_SIZE) super(target, base_type, block_size: block_size) @dimensions = dimensions end |
Instance Attribute Details
#base_type ⇒ Object
Returns the value of attribute base_type.
93 94 95 |
# File 'lib/symbolic/host_section.rb', line 93 def base_type @base_type end |
#dimensions ⇒ Object
Returns the value of attribute dimensions.
94 95 96 |
# File 'lib/symbolic/host_section.rb', line 94 def dimensions @dimensions end |
#target ⇒ Object
Returns the value of attribute target.
92 93 94 |
# File 'lib/symbolic/host_section.rb', line 92 def target @target end |
Instance Method Details
#==(other) ⇒ Object
106 107 108 |
# File 'lib/symbolic/host_section.rb', line 106 def ==(other) return super(other) && dimensions == other.dimensions end |
#accept(visitor) ⇒ Object
58 59 60 |
# File 'lib/symbolic/visitor.rb', line 58 def accept(visitor) visitor.visit_fixed_size_array_in_host_section_command(self) end |
#size ⇒ Object
102 103 104 |
# File 'lib/symbolic/host_section.rb', line 102 def size return dimensions.reduce(:*) end |