VectorType
public struct VectorType : IRType
extension VectorType: Equatable
A VectorType is a simple derived type that represents a vector of
elements. VectorTypes are used when multiple primitive data are operated
in parallel using a single instruction (SIMD). A vector type requires a size
(number of elements) and an underlying primitive data type.
-
Returns the type of elements in the vector.
Declaration
Swift
public let elementType: IRType -
Returns the number of elements in the vector.
Declaration
Swift
public let count: Int -
Creates a vector type of the given element type and size.
Note
The context of this type is taken from it’selementTypeDeclaration
Swift
public init(elementType: IRType, count: Int)Parameters
elementTypeThe type of elements of this vector.
countThe number of elements in this vector.
-
Creates a constant value of this vector type initialized with the given list of values.
Precondition
values.count == vector.countParameters
valuesA list of values of elements of this vector.
Return Value
A value representing a constant value of this vector type.
-
Retrieves the underlying LLVM type object.
Declaration
Swift
public func asLLVM() -> LLVMTypeRef -
Declaration
Swift
public static func == (lhs: VectorType, rhs: VectorType) -> Bool
VectorType Structure Reference