Class: Ikra::Symbolic::ArrayZipCommand
- Includes:
- ArrayCommand
- Defined in:
- lib/symbolic/visitor.rb,
lib/symbolic/symbolic.rb
Instance Attribute Summary
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
- #block_parameter_names ⇒ Object
-
#initialize(target, others, **options) ⇒ ArrayZipCommand
constructor
A new instance of ArrayZipCommand.
- #size ⇒ Object
Methods included from ArrayCommand
#[], #block_def_node, #command_binding, #command_translator_class, #dimensions, #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, others, **options) ⇒ ArrayZipCommand
Returns a new instance of ArrayZipCommand.
477 478 479 480 481 482 483 |
# File 'lib/symbolic/symbolic.rb', line 477 def initialize(target, others, **) super(**) @input = [SingleInput.new(command: target.to_command, pattern: :tid)] + others.map do |other| SingleInput.new(command: other.to_command, pattern: :tid) end end |
Instance Method Details
#==(other) ⇒ Object
494 495 496 |
# File 'lib/symbolic/symbolic.rb', line 494 def ==(other) return super(other) && size == other.size end |
#accept(visitor) ⇒ Object
40 41 42 |
# File 'lib/symbolic/visitor.rb', line 40 def accept(visitor) visitor.visit_array_zip_command(self) end |
#block_parameter_names ⇒ Object
489 490 491 492 |
# File 'lib/symbolic/symbolic.rb', line 489 def block_parameter_names # Have to set block parameter names but names are never used return [:irrelevant] * @input.size end |
#size ⇒ Object
485 486 487 |
# File 'lib/symbolic/symbolic.rb', line 485 def size return input.first.command.size end |