Class: LLVM::RealType
- Inherits:
-
Type
- Object
- Type
- LLVM::RealType
show all
- Defined in:
- lib/llvm/core/type.rb
Instance Attribute Summary
Attributes inherited from Type
#kind
Class Method Summary
collapse
-
.fits(values) ⇒ Object
given an array of values, return the type that will fit all of them currently only works for floats and doubles.
Instance Method Summary
collapse
Methods inherited from Type
#===, #aggregate?, #align, array, double, #dump, #element_type, float, from_ptr, function, integer, label, #literal_struct?, named, #null, #null_pointer, opaque_struct, #opaque_struct?, #packed_struct?, #pointer, pointer, #poison, ptr, #size, struct, #to_s, #undef, vector, void, x86_amx, x86_mmx
#==, #eql?, #hash, #to_ptr
Class Method Details
.fits(values) ⇒ Object
given an array of values, return the type that will fit all of them currently only works for floats and doubles
292
293
294
|
# File 'lib/llvm/core/type.rb', line 292
def self.fits(values)
values.detect { |v| v.type.to_s == 'double' } ? double : float
end
|
Instance Method Details
#type ⇒ Object
304
305
306
|
# File 'lib/llvm/core/type.rb', line 304
def type
self
end
|