LLVM API Documentation

Public Member Functions | Static Public Member Functions
llvm::VectorType Class Reference

#include <DerivedTypes.h>

Inheritance diagram for llvm::VectorType:
Inheritance graph
[legend]
Collaboration diagram for llvm::VectorType:
Collaboration graph
[legend]

List of all members.

Public Member Functions

unsigned getNumElements () const
 Return the number of elements in the Vector type.
unsigned getBitWidth () const
 Return the number of bits in the Vector type. Returns zero when the vector is a vector of pointers.

Static Public Member Functions

static VectorTypeget (Type *ElementType, unsigned NumElements)
static VectorTypegetInteger (VectorType *VTy)
static VectorTypegetExtendedElementVectorType (VectorType *VTy)
static VectorTypegetTruncatedElementVectorType (VectorType *VTy)
static VectorTypegetHalfElementsVectorType (VectorType *VTy)
static VectorTypegetDoubleElementsVectorType (VectorType *VTy)
static bool isValidElementType (Type *ElemTy)
static bool classof (const Type *T)
 Methods for support type inquiry through isa, cast, and dyn_cast.

Detailed Description

VectorType - Class to represent vector types.

Definition at line 355 of file DerivedTypes.h.


Member Function Documentation

static bool llvm::VectorType::classof ( const Type T) [inline, static]

Methods for support type inquiry through isa, cast, and dyn_cast.

Reimplemented from llvm::SequentialType.

Definition at line 434 of file DerivedTypes.h.

References llvm::Type::getTypeID(), and llvm::Type::VectorTyID.

VectorType * VectorType::get ( Type ElementType,
unsigned  NumElements 
) [static]

Return the number of bits in the Vector type. Returns zero when the vector is a vector of pointers.

Definition at line 429 of file DerivedTypes.h.

VectorType::getDoubleElementsVectorType - This static method returns a VectorType with twice as many elements as the input type and the same element type.

Definition at line 415 of file DerivedTypes.h.

References llvm::IntegerType::get(), llvm::SequentialType::getElementType(), and getNumElements().

VectorType::getExtendedElementVectorType - This static method is like getInteger except that the element types are twice as wide as the elements in the input type.

Definition at line 382 of file DerivedTypes.h.

References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().

Referenced by DecodeFixedType().

VectorType::getHalfElementsVectorType - This static method returns a VectorType with half as many elements as the input type and the same element type.

Definition at line 404 of file DerivedTypes.h.

References llvm::IntegerType::get(), llvm::SequentialType::getElementType(), and getNumElements().

Referenced by DecodeFixedType().

static VectorType* llvm::VectorType::getInteger ( VectorType VTy) [inline, static]

VectorType::getInteger - This static method gets a VectorType with the same number of elements as the input type, and the element type is an integer type of the same width as the input element type.

Definition at line 371 of file DerivedTypes.h.

References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().

VectorType::getTruncatedElementVectorType - This static method is like getInteger except that the element types are half as wide as the elements in the input type.

Definition at line 392 of file DerivedTypes.h.

References llvm::IntegerType::get(), llvm::Type::getContext(), llvm::SequentialType::getElementType(), getNumElements(), and llvm::Type::getPrimitiveSizeInBits().

Referenced by DecodeFixedType().

bool VectorType::isValidElementType ( Type ElemTy) [static]

isValidElementType - Return true if the specified type is valid as a element type.

Definition at line 727 of file Type.cpp.

References llvm::Type::isFloatingPointTy(), llvm::Type::isIntegerTy(), and llvm::Type::isPointerTy().

Referenced by get().


The documentation for this class was generated from the following files: