Class: MilkTea::Types::Simd
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.
1555 1556 1557 1558 1559 1560 1561 1562 1563 |
# File 'lib/milk_tea/core/types.rb', line 1555 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.
1553 1554 1555 |
# File 'lib/milk_tea/core/types.rb', line 1553 def element_type @element_type end |
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
1571 1572 1573 |
# File 'lib/milk_tea/core/types.rb', line 1571 def hash @hash end |
#lane_count ⇒ Object (readonly)
Returns the value of attribute lane_count.
1553 1554 1555 |
# File 'lib/milk_tea/core/types.rb', line 1553 def lane_count @lane_count end |
#module_name ⇒ Object (readonly)
Returns the value of attribute module_name.
1553 1554 1555 |
# File 'lib/milk_tea/core/types.rb', line 1553 def module_name @module_name end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
1553 1554 1555 |
# File 'lib/milk_tea/core/types.rb', line 1553 def name @name end |
Instance Method Details
#children ⇒ Object
1589 1590 1591 |
# File 'lib/milk_tea/core/types.rb', line 1589 def children [element_type] end |
#eql?(other) ⇒ Boolean Also known as: ==
1565 1566 1567 |
# File 'lib/milk_tea/core/types.rb', line 1565 def eql?(other) other.is_a?(Simd) && other.element_type == element_type && other.lane_count == lane_count end |
#field(name) ⇒ Object
1577 1578 1579 |
# File 'lib/milk_tea/core/types.rb', line 1577 def field(name) @fields[name] end |
#fields ⇒ Object
1573 1574 1575 |
# File 'lib/milk_tea/core/types.rb', line 1573 def fields @fields end |
#numeric? ⇒ Boolean
1581 1582 1583 |
# File 'lib/milk_tea/core/types.rb', line 1581 def numeric? true end |
#to_s ⇒ Object
1585 1586 1587 |
# File 'lib/milk_tea/core/types.rb', line 1585 def to_s @name end |