Class: MilkTea::Types::Simd
- Defined in:
- lib/milk_tea/core/types/types.rb
Instance Attribute Summary collapse
-
#element_type ⇒ Object
readonly
Returns the value of attribute element_type.
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#lane_count ⇒ Object
readonly
Returns the value of attribute lane_count.
-
#module_name ⇒ Object
readonly
Returns the value of attribute module_name.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #children ⇒ Object
- #eql?(other) ⇒ Boolean (also: #==)
- #field(name) ⇒ Object
- #fields ⇒ Object
-
#initialize(element_type, lane_count:) ⇒ Simd
constructor
A new instance of Simd.
- #numeric? ⇒ Boolean
- #to_s ⇒ Object
Methods inherited from Base
#accept, #bitwise?, #boolean?, #field_c_name, #float?, #integer?, #sendable?, #void?
Constructor Details
#initialize(element_type, lane_count:) ⇒ Simd
Returns a new instance of Simd.
1566 1567 1568 1569 1570 1571 1572 1573 1574 |
# File 'lib/milk_tea/core/types/types.rb', line 1566 def initialize(element_type, lane_count:) @element_type = element_type @lane_count = lane_count @name = "simd[#{element_type}, #{lane_count}]" @module_name = nil @fields = {}.freeze @hash = [self.class, element_type, lane_count].hash freeze end |
Instance Attribute Details
#element_type ⇒ Object (readonly)
Returns the value of attribute element_type.
1564 1565 1566 |
# File 'lib/milk_tea/core/types/types.rb', line 1564 def element_type @element_type end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
1582 1583 1584 |
# File 'lib/milk_tea/core/types/types.rb', line 1582 def hash @hash end |
#lane_count ⇒ Object (readonly)
Returns the value of attribute lane_count.
1564 1565 1566 |
# File 'lib/milk_tea/core/types/types.rb', line 1564 def lane_count @lane_count end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
1564 1565 1566 |
# File 'lib/milk_tea/core/types/types.rb', line 1564 def module_name @module_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
1564 1565 1566 |
# File 'lib/milk_tea/core/types/types.rb', line 1564 def name @name end |
Instance Method Details
#children ⇒ Object
1600 1601 1602 |
# File 'lib/milk_tea/core/types/types.rb', line 1600 def children [element_type] end |
#eql?(other) ⇒ Boolean Also known as: ==
1576 1577 1578 |
# File 'lib/milk_tea/core/types/types.rb', line 1576 def eql?(other) other.is_a?(Simd) && other.element_type == element_type && other.lane_count == lane_count end |
#field(name) ⇒ Object
1588 1589 1590 |
# File 'lib/milk_tea/core/types/types.rb', line 1588 def field(name) @fields[name] end |
#fields ⇒ Object
1584 1585 1586 |
# File 'lib/milk_tea/core/types/types.rb', line 1584 def fields @fields end |
#numeric? ⇒ Boolean
1592 1593 1594 |
# File 'lib/milk_tea/core/types/types.rb', line 1592 def numeric? true end |
#to_s ⇒ Object
1596 1597 1598 |
# File 'lib/milk_tea/core/types/types.rb', line 1596 def to_s @name end |