Intel® Implicit SPMD Program Compiler (Intel® ISPC)  1.13.0
Classes | Enumerations | Functions
type.h File Reference

File with declarations for classes related to type representation. More...

#include "ispc.h"
#include "util.h"
#include <llvm/ADT/SmallVector.h>
#include <llvm/IR/DerivedTypes.h>
#include <llvm/IR/Type.h>
Include dependency graph for type.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Variability
 
class  Type
 Interface class that defines the type abstraction. More...
 
class  AtomicType
 AtomicType represents basic types like floats, ints, etc. More...
 
class  EnumType
 Type implementation for enumerated types. More...
 
class  PointerType
 Type implementation for pointers to other types. More...
 
class  CollectionType
 Abstract base class for types that represent collections of other types. More...
 
class  SequentialType
 Abstract base class for types that represent sequences. More...
 
class  ArrayType
 One-dimensional array type. More...
 
class  VectorType
 A (short) vector of atomic types. More...
 
class  StructType
 Representation of a structure holding a number of members. More...
 
class  UndefinedStructType
 
class  ReferenceType
 Type representing a reference to another (non-reference) type. More...
 
class  FunctionType
 Type representing a function (return type + argument types) More...
 

Enumerations

enum  TypeId {
  ATOMIC_TYPE, ENUM_TYPE, POINTER_TYPE, ARRAY_TYPE,
  VECTOR_TYPE, STRUCT_TYPE, UNDEFINED_STRUCT_TYPE, REFERENCE_TYPE,
  FUNCTION_TYPE
}
 

Functions

template<typename T >
const T * CastType (const Type *type)
 
template<>
const AtomicTypeCastType (const Type *type)
 
template<>
const EnumTypeCastType (const Type *type)
 
template<>
const PointerTypeCastType (const Type *type)
 
template<>
const ArrayTypeCastType (const Type *type)
 
template<>
const VectorTypeCastType (const Type *type)
 
template<>
const SequentialTypeCastType (const Type *type)
 
template<>
const CollectionTypeCastType (const Type *type)
 
template<>
const StructTypeCastType (const Type *type)
 
template<>
const UndefinedStructTypeCastType (const Type *type)
 
template<>
const ReferenceTypeCastType (const Type *type)
 
template<>
const FunctionTypeCastType (const Type *type)
 
bool IsReferenceType (const Type *t)
 

Detailed Description

File with declarations for classes related to type representation.

Definition in file type.h.

Enumeration Type Documentation

◆ TypeId

enum TypeId

Enumerant that records each of the types that inherit from the Type baseclass.

Enumerator
ATOMIC_TYPE 
ENUM_TYPE 
POINTER_TYPE 
ARRAY_TYPE 
VECTOR_TYPE 
STRUCT_TYPE 
UNDEFINED_STRUCT_TYPE 
REFERENCE_TYPE 
FUNCTION_TYPE 

Definition at line 73 of file type.h.

Function Documentation

◆ CastType() [1/12]

template<typename T >
const T* CastType ( const Type type)
inline

Definition at line 925 of file type.h.

◆ CastType() [2/12]

template<>
const AtomicType* CastType ( const Type type)
inline

Definition at line 931 of file type.h.

References ATOMIC_TYPE, Variability::type, and Type::typeId.

◆ CastType() [3/12]

template<>
const EnumType* CastType ( const Type type)
inline

Definition at line 938 of file type.h.

References ENUM_TYPE, Variability::type, and Type::typeId.

◆ CastType() [4/12]

template<>
const PointerType* CastType ( const Type type)
inline

Definition at line 945 of file type.h.

References POINTER_TYPE, Variability::type, and Type::typeId.

◆ CastType() [5/12]

template<>
const ArrayType* CastType ( const Type type)
inline

Definition at line 952 of file type.h.

References ARRAY_TYPE, Variability::type, and Type::typeId.

◆ CastType() [6/12]

template<>
const VectorType* CastType ( const Type type)
inline

Definition at line 959 of file type.h.

References Variability::type, Type::typeId, and VECTOR_TYPE.

◆ CastType() [7/12]

template<>
const SequentialType* CastType ( const Type type)
inline

Definition at line 966 of file type.h.

References ARRAY_TYPE, Variability::type, Type::typeId, and VECTOR_TYPE.

◆ CastType() [8/12]

template<>
const CollectionType* CastType ( const Type type)
inline

Definition at line 975 of file type.h.

References ARRAY_TYPE, STRUCT_TYPE, Variability::type, Type::typeId, and VECTOR_TYPE.

◆ CastType() [9/12]

template<>
const StructType* CastType ( const Type type)
inline

Definition at line 984 of file type.h.

References STRUCT_TYPE, Variability::type, and Type::typeId.

◆ CastType() [10/12]

template<>
const UndefinedStructType* CastType ( const Type type)
inline

Definition at line 991 of file type.h.

References Variability::type, Type::typeId, and UNDEFINED_STRUCT_TYPE.

◆ CastType() [11/12]

template<>
const ReferenceType* CastType ( const Type type)
inline

Definition at line 998 of file type.h.

References REFERENCE_TYPE, Variability::type, and Type::typeId.

◆ CastType() [12/12]

template<>
const FunctionType* CastType ( const Type type)
inline

Definition at line 1005 of file type.h.

References FUNCTION_TYPE, Variability::type, and Type::typeId.

◆ IsReferenceType()

bool IsReferenceType ( const Type t)
inline

Definition at line 1012 of file type.h.

Referenced by DeclStmt::EmitCode(), and ReturnStmt::EmitCode().