Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
proteus Namespace Reference

Namespaces

namespace  builtins
 
namespace  detail
 
namespace  helpers
 

Classes

class  AnnotationHandler
 
struct  ArgTypeList
 
struct  ArrayInfo
 
class  BinaryInfo
 
struct  CacheEntry
 
class  CodeBuilder
 
class  CodeGenerationConfig
 
class  CommThreadHandle
 Manages the lifecycle of a background communication thread. More...
 
class  CompilationResult
 
class  CompilationTask
 
struct  CompiledLibrary
 
class  CompilerAsync
 
class  CompilerSync
 
class  Config
 
class  CppJitModule
 
struct  DeviceTraits
 
struct  DeviceTraits< JitEngineDeviceCUDA >
 
struct  DeviceTraits< JitEngineDeviceHIP >
 
class  Dispatcher
 
class  DispatcherHost
 
struct  DispatchResult
 
struct  EmittedLoopTag
 
struct  EmptyLambda
 
struct  FatbinWrapperT
 
struct  FnSig
 
struct  FnSig< RetT_(ArgT...)>
 
class  ForLoopBuilder
 
class  Func
 
class  FuncBase
 
struct  GlobalVarInfo
 
class  HashT
 
struct  InitLLVMTargets
 
struct  IntrinsicOperandConverter
 
class  IRFunction
 
struct  IRType
 
class  IRValue
 
struct  IsForLoopBuilder
 
struct  IsForLoopBuilder< ForLoopBuilder< T, BodyLambda > >
 
class  JitEngine
 
class  JitEngineDevice
 
class  JitEngineDeviceCUDA
 
class  JitEngineDeviceHIP
 
class  JitEngineHost
 
class  JitEngineInfoRegistry
 
struct  JitFunctionInfo
 
class  JITKernelInfo
 
class  JitModule
 
class  LambdaRegistry
 
struct  LinkingCloner
 
class  LLVMCodeBuilder
 
class  LLVMIRFunction
 
class  LLVMIRValue
 
class  Logger
 
struct  LookupRequest
 
struct  LookupResponse
 
class  LoopBoundInfo
 
struct  LoopHints
 
class  LoopNestBuilder
 
class  MemoryCache
 
struct  ModuleInfo
 
class  MPICommHandle
 RAII wrapper for MPI communicator with thread safety checks. More...
 
class  MPILocalLookupCache
 
class  MPIRemoteLookupCache
 
class  MPIStorageCache
 
class  ObjectCache
 
class  ObjectCacheChain
 
struct  ObjectInfo
 
struct  ProteusTypes
 
struct  RegisterFatBinaryInfo
 
struct  RegisterFunctionInfo
 
struct  RegisterLinkedBinaryInfo
 
struct  RegisterVarInfo
 
struct  RuntimeConstant
 
struct  RuntimeConstantArgInfo
 
struct  RuntimeConstantArrayInfo
 
struct  RuntimeConstantInfo
 
struct  RuntimeConstantObjectInfo
 
union  RuntimeConstantValue
 
class  ScopedTimeTrace
 
struct  sig_traits
 
struct  sig_traits< R(Args...)>
 
class  StorageCache
 
struct  StoreMessage
 
class  Timer
 
struct  TimeTracerRAII
 
struct  TimeTraceScopeWrapper
 
class  TransformArgumentSpecialization
 
class  TransformLambdaSpecialization
 
class  TransformSharedArray
 
struct  TypeMap
 
struct  TypeMap< bool >
 
struct  TypeMap< bool[]>
 
struct  TypeMap< const T * >
 
struct  TypeMap< const T >
 
struct  TypeMap< double * >
 
struct  TypeMap< double >
 
struct  TypeMap< double[]>
 
struct  TypeMap< float * >
 
struct  TypeMap< float >
 
struct  TypeMap< float[]>
 
struct  TypeMap< int * >
 
struct  TypeMap< int >
 
struct  TypeMap< int[]>
 
struct  TypeMap< size_t >
 
struct  TypeMap< size_t[]>
 
struct  TypeMap< T & >
 
struct  TypeMap< unsigned int * >
 
struct  TypeMap< unsigned int >
 
struct  TypeMap< unsigned int[]>
 
struct  TypeMap< void >
 
struct  Var
 
struct  Var< T, std::enable_if_t< is_pointer_unref_v< T > > >
 
struct  Var< T, std::enable_if_t< is_scalar_arithmetic_v< T > > >
 
struct  Var< T, std::enable_if_t< std::is_array_v< T > > >
 
struct  VarAlloc
 

Typedefs

using Clock = std::chrono::steady_clock
 
template<typename T >
using remove_cvref_t = std::remove_cv_t< std::remove_reference_t< T > >
 

Enumerations

enum class  MPITag : int { Store = 1 , LookupRequest = 2 , LookupResponse = 3 }
 
enum class  CodegenOption { RTC , Serial , Parallel }
 
enum class  KernelCloneOption { LinkClonePrune , LinkCloneLight , CrossClone }
 
enum class  TraceOption : unsigned { Specialization = 0x1 , IRDump = 0x2 , KernelTrace = 0x4 , CacheStats = 0x8 }
 
enum class  AddressSpace : unsigned int {
  DEFAULT = 0 , GLOBAL = 1 , SHARED = 3 , CONSTANT = 4 ,
  LOCAL = 5
}
 
enum  RuntimeConstantType : int32_t {
  BEGIN , NONE = 0 , BOOL = 1 , INT8 ,
  INT32 , INT64 , FLOAT , DOUBLE ,
  LONG_DOUBLE , PTR , STATIC_ARRAY , VECTOR ,
  ARRAY , OBJECT , END
}
 
enum class  ScopeKind { FUNCTION , IF , FOR , WHILE }
 
enum class  ArithOp {
  Add , Sub , Mul , Div ,
  Rem
}
 Semantic arithmetic operation selector. More...
 
enum class  CmpOp {
  EQ , NE , LT , LE ,
  GT , GE
}
 Semantic comparison operation selector. More...
 
enum class  EmissionPolicy { Eager , Lazy }
 
enum class  IRTypeKind {
  Void , Int1 , Int16 , Int32 ,
  Int64 , Float , Double , Pointer ,
  Array
}
 
enum class  TargetModelType {
  HOST , CUDA , HIP , HOST_HIP ,
  HOST_CUDA
}
 

Functions

void validateMPIConfig ()
 
std::vector< char > packStoreMessage (MPI_Comm Comm, const HashT &HashValue, const CacheEntry &Entry)
 
StoreMessage unpackStoreMessage (MPI_Comm Comm, const std::vector< char > &Buffer)
 
std::unique_ptr< Module > cloneKernelFromModule (Module &M, StringRef Name, CallGraph &CG)
 
std::unique_ptr< Module > cloneKernelFromModules (ArrayRef< std::reference_wrapper< Module > > Mods, StringRef EntryName, function_ref< bool(const GlobalValue *)> ShouldCloneDefinition=nullptr)
 
template<typename T >
getRuntimeConstantValue (void *Arg)
 
RuntimeConstant dispatchGetRuntimeConstantValue (void **Args, const RuntimeConstantInfo &RCInfo)
 
std::string toString (CodegenOption Option)
 
std::string toString (KernelCloneOption Option)
 
std::optional< std::string > getEnvOrDefaultString (const char *VarName)
 
char getEnvOrDefaultChar (const char *VarName, char Default)
 
bool getEnvOrDefaultBool (const char *VarName, bool Default)
 
int getEnvOrDefaultInt (const char *VarName, int Default)
 
CodegenOption strToCG (std::string CGstr)
 
CodegenOption getEnvOrDefaultCG (const char *VarName, CodegenOption Default)
 
template<typename T >
getDefaultValueFromOptional (std::optional< T > JSONValue, T Default)
 
unsigned parseTraceConfig (const char *VarName)
 
KernelCloneOption getEnvOrDefaultKC (const char *VarName, KernelCloneOption Default)
 
llvm::StringMap< const CodeGenerationConfigparseJSONConfig (std::optional< std::string > JSONFn)
 
void * resolveDeviceGlobalAddr (const void *Addr)
 
cudaError_t launchKernelDirect (void *KernelFunc, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, CUstream Stream)
 
CUfunction getKernelFunctionFromImage (StringRef KernelName, const void *Image, bool RelinkGlobalsByCopy, const std::unordered_map< std::string, GlobalVarInfo > &VarNameToGlobalInfo)
 
cudaError_t launchKernelFunction (CUfunction KernelFunc, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, CUstream Stream)
 
hipError_t launchKernelDirect (void *KernelFunc, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, hipStream_t Stream)
 
hipError_t launchKernelFunction (hipFunction_t KernelFunc, dim3 GridDim, dim3 BlockDim, void **KernelArgs, uint64_t ShmemSize, hipStream_t Stream)
 
void optimizeIR (Module &M, StringRef Arch, char OptLevel, unsigned CodegenOptLevel)
 
void optimizeIR (Module &M, StringRef Arch, const std::string &PassPipeline, unsigned CodegenOptLevel)
 
std::unique_ptr< Module > linkModules (LLVMContext &Ctx, SmallVector< std::unique_ptr< Module > > LinkedModules)
 
void runCleanupPassPipeline (Module &M)
 
void pruneIR (Module &M, bool UnsetExternallyInitialized=true)
 
void internalize (Module &M, StringRef PreserveFunctionName)
 
void setLaunchBoundsForKernel (Function &F, int MaxThreadsPerSM, int MinBlocksPerSM=0)
 
void codegenPTX (Module &M, StringRef DeviceArch, SmallVectorImpl< char > &PTXStr)
 
std::unique_ptr< MemoryBuffer > codegenObject (Module &M, StringRef DeviceArch, SmallPtrSetImpl< void * > &GlobalLinkedBinaries, CodegenOption CGOption=CodegenOption::RTC)
 
std::string toString (Value &V)
 
HashT hashValue (const HashT &H)
 
HashT hashValue (const StringRef &S)
 
HashT hashValue (const std::string &S)
 
template<typename T >
std::enable_if_t< std::is_scalar< T >::value, HashThashValue (const T &V)
 
template<typename T >
HashT hashRuntimeConstantArray (const RuntimeConstant &RC)
 
HashT hashRuntimeConstantObject (const RuntimeConstant &RC)
 
HashT hashArrayRefElement (const RuntimeConstant &RC)
 
HashT hashValue (ArrayRef< RuntimeConstant > Arr)
 
HashT hashCombine (HashT A, HashT B)
 
template<typename FirstT , typename... RestTs>
HashT hash (FirstT &&First, RestTs &&...Rest)
 
template<typename T >
HashT hash (T &&Data)
 
RuntimeConstantType convertTypeToRuntimeConstantType (Type *Ty)
 
Type * convertRuntimeConstantTypeToLLVMType (RuntimeConstantType RCType, LLVMContext &Ctx)
 
std::string toString (const RuntimeConstantType RCType)
 
size_t getSizeInBytes (RuntimeConstantType RCType)
 
template<typename T >
getValue (const RuntimeConstant &RC)
 
bool isScalarRuntimeConstantType (RuntimeConstantType RCType)
 
Constant * getConstant (LLVMContext &Ctx, Type *ArgType, const RuntimeConstant &RC)
 
bool isDebugOutputEnabled ()
 
bool isDeviceCompilation (Module &M)
 
std::string getUniqueFileID (Module &M)
 
bool isDeviceKernel (const Function *F)
 
void reportFatalError (const llvm::Twine &Reason, const char *FILE, unsigned Line)
 
void reportFatalError (const char *Reason, const char *FILE, unsigned Line)
 
void reportFatalError (const std::string &Reason, const char *FILE, unsigned Line)
 
void reportFatalError (const llvm::StringRef &Reason, const char *FILE, unsigned Line)
 
llvm::Type * toLLVMType (const IRType &T, LLVMContext &Ctx)
 
TargetModelType parseTargetModel (const std::string &Target)
 
std::string getTargetTriple (TargetModelType Model)
 
bool isHostTargetModel (TargetModelType TargetModel)
 
void init ()
 
void finalize ()
 
void enable ()
 
void disable ()
 
constexpr unsigned toLLVM (AddressSpace AS)
 
std::string toString (ScopeKind Kind)
 
template<typename... Ts>
std::vector< IRTypeunpackArgTypes (ArgTypeList< Ts... >)
 
bool isIntegerKind (const IRType &T)
 Returns true when T is an integer kind (Int1, Int16, Int32, or Int64).
 
bool isFloatingPointKind (const IRType &T)
 Returns true when T is a floating-point kind (Float or Double).
 
llvm::Type * toLLVMType (const IRType &T, llvm::LLVMContext &Ctx)
 
template<typename T >
llvm::Type * getLLVMType (llvm::LLVMContext &Ctx, std::size_t NElem=0)
 
template<typename T >
llvm::Type * getLLVMPointerElemType (llvm::LLVMContext &Ctx)
 
template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > operator+ (const T &ConstValue, const Var< U > &Var)
 
template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > operator- (const T &ConstValue, const Var< U > &V)
 
template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > operator* (const T &ConstValue, const Var< U > &V)
 
template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > operator/ (const T &ConstValue, const Var< U > &V)
 
template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > operator% (const T &ConstValue, const Var< U > &V)
 
template<typename T >
Var< T > declVar (CodeBuilder &CB, const std::string &Name="var")
 
template<typename T >
Var< T > defVar (CodeBuilder &CB, const T &Val, const std::string &Name="var")
 
template<typename T , typename U >
Var< std::common_type_t< remove_cvref_t< T >, remove_cvref_t< U > > > binOp (const Var< T > &L, const Var< U > &R, ArithOp Op)
 
template<typename T , typename U >
Var< T, std::enable_if_t< is_scalar_arithmetic_v< T > > > & compoundAssignConst (Var< T, std::enable_if_t< is_scalar_arithmetic_v< T > > > &LHS, const U &ConstValue, ArithOp Op)
 
template<typename T , typename U >
Var< bool > cmpOp (const Var< T > &L, const Var< U > &R, CmpOp Op)
 
template<typename T >
Var< float > powf (const Var< float > &L, const Var< T > &R)
 
template<typename T >
Var< float > sqrtf (const Var< T > &R)
 
template<typename T >
Var< float > expf (const Var< T > &R)
 
template<typename T >
Var< float > sinf (const Var< T > &R)
 
template<typename T >
Var< float > cosf (const Var< T > &R)
 
template<typename T >
Var< float > fabs (const Var< T > &R)
 
template<typename T >
Var< float > truncf (const Var< T > &R)
 
template<typename T >
Var< float > logf (const Var< T > &R)
 
template<typename T >
Var< float > absf (const Var< T > &R)
 
template<typename T >
std::enable_if_t< is_arithmetic_unref_v< T >, Var< remove_cvref_t< T > > > min (const Var< T > &L, const Var< T > &R)
 
template<typename T >
std::enable_if_t< is_arithmetic_unref_v< T >, Var< remove_cvref_t< T > > > max (const Var< T > &L, const Var< T > &R)
 
template<typename T >
 __attribute__ ((noinline)) void jit_arg(T V) noexcept
 

Variables

cudaError_t(* __proteus_cudaGetSymbolAddress_ptr )(void **, const void *) = nullptr
 
cudaError_t(* __proteus_cudaLaunchKernel_ptr )(const void *, dim3, dim3, void **, size_t, cudaStream_t) = nullptr
 
TimeTracerRAII TimeTracer
 
template<typename T >
constexpr bool is_arithmetic_unref_v
 
template<typename T >
constexpr bool is_pointer_unref_v
 
template<typename T >
constexpr bool is_scalar_arithmetic_v
 
template<typename T >
constexpr bool is_mutable_v
 
size_t NumElts
 
size_t std::remove_pointer< T >::type Velem = 0) noexcept
 
static int Pos = -1
 
static int int Offset = -1
 

Typedef Documentation

◆ Clock

using proteus::Clock = typedef std::chrono::steady_clock

◆ remove_cvref_t

template<typename T >
using proteus::remove_cvref_t = typedef std::remove_cv_t<std::remove_reference_t<T> >

Enumeration Type Documentation

◆ AddressSpace

enum class proteus::AddressSpace : unsigned int
strong
Enumerator
DEFAULT 
GLOBAL 
SHARED 
CONSTANT 
LOCAL 

◆ ArithOp

enum class proteus::ArithOp
strong

Semantic arithmetic operation selector.

Enumerator
Add 
Sub 
Mul 
Div 
Rem 

◆ CmpOp

enum class proteus::CmpOp
strong

Semantic comparison operation selector.

Enumerator
EQ 
NE 
LT 
LE 
GT 
GE 

◆ CodegenOption

enum class proteus::CodegenOption
strong
Enumerator
RTC 
Serial 
Parallel 

◆ EmissionPolicy

enum class proteus::EmissionPolicy
strong
Enumerator
Eager 
Lazy 

◆ IRTypeKind

enum class proteus::IRTypeKind
strong

Enumerates the primitive IR type kinds understood by Proteus. This enumeration is backend-independent; individual backends (e.g. LLVM, MLIR) are responsible for mapping these kinds to their own type representations.

Enumerator
Void 
Int1 
Int16 
Int32 
Int64 
Float 
Double 
Pointer 
Array 

◆ KernelCloneOption

enum class proteus::KernelCloneOption
strong
Enumerator
LinkClonePrune 
LinkCloneLight 
CrossClone 

◆ MPITag

enum class proteus::MPITag : int
strong
Enumerator
Store 
LookupRequest 
LookupResponse 

◆ RuntimeConstantType

Enumerator
BEGIN 
NONE 
BOOL 
INT8 
INT32 
INT64 
FLOAT 
DOUBLE 
LONG_DOUBLE 
PTR 
STATIC_ARRAY 
VECTOR 
ARRAY 
OBJECT 
END 

◆ ScopeKind

enum class proteus::ScopeKind
strong
Enumerator
FUNCTION 
IF 
FOR 
WHILE 

◆ TargetModelType

enum class proteus::TargetModelType
strong
Enumerator
HOST 
CUDA 
HIP 
HOST_HIP 
HOST_CUDA 

◆ TraceOption

enum class proteus::TraceOption : unsigned
strong
Enumerator
Specialization 
IRDump 
KernelTrace 
CacheStats 

Function Documentation

◆ __attribute__()

template<typename T >
proteus::__attribute__ ( (noinline)  )
noexcept

◆ absf()

template<typename T >
Var< float > proteus::absf ( const Var< T > &  R)

◆ binOp()

template<typename T , typename U >
Var< std::common_type_t< remove_cvref_t< T >, remove_cvref_t< U > > > proteus::binOp ( const Var< T > &  L,
const Var< U > &  R,
ArithOp  Op 
)

◆ cloneKernelFromModule()

std::unique_ptr< Module > proteus::cloneKernelFromModule ( Module &  M,
StringRef  Name,
CallGraph &  CG 
)
inline

◆ cloneKernelFromModules()

std::unique_ptr< Module > proteus::cloneKernelFromModules ( ArrayRef< std::reference_wrapper< Module > >  Mods,
StringRef  EntryName,
function_ref< bool(const GlobalValue *)>  ShouldCloneDefinition = nullptr 
)
inline

◆ cmpOp()

template<typename T , typename U >
Var< bool > proteus::cmpOp ( const Var< T > &  L,
const Var< U > &  R,
CmpOp  Op 
)

◆ codegenObject()

std::unique_ptr< MemoryBuffer > proteus::codegenObject ( Module &  M,
StringRef  DeviceArch,
SmallPtrSetImpl< void * > &  GlobalLinkedBinaries,
CodegenOption  CGOption = CodegenOption::RTC 
)
inline

◆ codegenPTX()

void proteus::codegenPTX ( Module &  M,
StringRef  DeviceArch,
SmallVectorImpl< char > &  PTXStr 
)
inline

◆ compoundAssignConst()

template<typename T , typename U >
Var< T, std::enable_if_t< is_scalar_arithmetic_v< T > > > & proteus::compoundAssignConst ( Var< T, std::enable_if_t< is_scalar_arithmetic_v< T > > > &  LHS,
const U &  ConstValue,
ArithOp  Op 
)

◆ convertRuntimeConstantTypeToLLVMType()

Type * proteus::convertRuntimeConstantTypeToLLVMType ( RuntimeConstantType  RCType,
LLVMContext &  Ctx 
)
inline

◆ convertTypeToRuntimeConstantType()

RuntimeConstantType proteus::convertTypeToRuntimeConstantType ( Type *  Ty)
inline

◆ cosf()

template<typename T >
Var< float > proteus::cosf ( const Var< T > &  R)

◆ declVar()

template<typename T >
Var< T > proteus::declVar ( CodeBuilder CB,
const std::string &  Name = "var" 
)

◆ defVar()

template<typename T >
Var< T > proteus::defVar ( CodeBuilder CB,
const T &  Val,
const std::string &  Name = "var" 
)

◆ disable()

void proteus::disable ( )

◆ dispatchGetRuntimeConstantValue()

RuntimeConstant proteus::dispatchGetRuntimeConstantValue ( void **  Args,
const RuntimeConstantInfo RCInfo 
)
inline

◆ enable()

void proteus::enable ( )

◆ expf()

template<typename T >
Var< float > proteus::expf ( const Var< T > &  R)

◆ fabs()

template<typename T >
Var< float > proteus::fabs ( const Var< T > &  R)

◆ finalize()

void proteus::finalize ( )

◆ getConstant()

Constant * proteus::getConstant ( LLVMContext &  Ctx,
Type *  ArgType,
const RuntimeConstant RC 
)
inline

◆ getDefaultValueFromOptional()

template<typename T >
T proteus::getDefaultValueFromOptional ( std::optional< T >  JSONValue,
Default 
)

◆ getEnvOrDefaultBool()

bool proteus::getEnvOrDefaultBool ( const char *  VarName,
bool  Default 
)
inline

◆ getEnvOrDefaultCG()

CodegenOption proteus::getEnvOrDefaultCG ( const char *  VarName,
CodegenOption  Default 
)
inline

◆ getEnvOrDefaultChar()

char proteus::getEnvOrDefaultChar ( const char *  VarName,
char  Default 
)
inline

◆ getEnvOrDefaultInt()

int proteus::getEnvOrDefaultInt ( const char *  VarName,
int  Default 
)
inline

◆ getEnvOrDefaultKC()

KernelCloneOption proteus::getEnvOrDefaultKC ( const char *  VarName,
KernelCloneOption  Default 
)
inline

◆ getEnvOrDefaultString()

std::optional< std::string > proteus::getEnvOrDefaultString ( const char *  VarName)
inline

◆ getKernelFunctionFromImage()

hipFunction_t proteus::getKernelFunctionFromImage ( StringRef  KernelName,
const void *  Image,
bool  RelinkGlobalsByCopy,
const std::unordered_map< std::string, GlobalVarInfo > &  VarNameToGlobalInfo 
)
inline

◆ getLLVMPointerElemType()

template<typename T >
llvm::Type * proteus::getLLVMPointerElemType ( llvm::LLVMContext &  Ctx)

Return the llvm::Type* of the element type for a C++ pointer type T, or nullptr when T is not a pointer type. This is the LLVM-backend counterpart of TypeMap<T>::getPointerElemType().

◆ getLLVMType()

template<typename T >
llvm::Type * proteus::getLLVMType ( llvm::LLVMContext &  Ctx,
std::size_t  NElem = 0 
)

Return the llvm::Type* for a C++ type T. This is the LLVM-backend counterpart of TypeMap<T>::get().

◆ getRuntimeConstantValue()

template<typename T >
T proteus::getRuntimeConstantValue ( void *  Arg)
inline

◆ getSizeInBytes()

size_t proteus::getSizeInBytes ( RuntimeConstantType  RCType)
inline

◆ getTargetTriple()

std::string proteus::getTargetTriple ( TargetModelType  Model)

◆ getUniqueFileID()

std::string proteus::getUniqueFileID ( Module &  M)
inline

◆ getValue()

template<typename T >
T proteus::getValue ( const RuntimeConstant RC)

◆ hash() [1/2]

template<typename FirstT , typename... RestTs>
HashT proteus::hash ( FirstT &&  First,
RestTs &&...  Rest 
)
inline

◆ hash() [2/2]

template<typename T >
HashT proteus::hash ( T &&  Data)
inline

◆ hashArrayRefElement()

HashT proteus::hashArrayRefElement ( const RuntimeConstant RC)
inline

◆ hashCombine()

HashT proteus::hashCombine ( HashT  A,
HashT  B 
)
inline

◆ hashRuntimeConstantArray()

template<typename T >
HashT proteus::hashRuntimeConstantArray ( const RuntimeConstant RC)
inline

◆ hashRuntimeConstantObject()

HashT proteus::hashRuntimeConstantObject ( const RuntimeConstant RC)
inline

◆ hashValue() [1/5]

HashT proteus::hashValue ( ArrayRef< RuntimeConstant Arr)
inline

◆ hashValue() [2/5]

HashT proteus::hashValue ( const HashT H)
inline

◆ hashValue() [3/5]

HashT proteus::hashValue ( const std::string &  S)
inline

◆ hashValue() [4/5]

HashT proteus::hashValue ( const StringRef &  S)
inline

◆ hashValue() [5/5]

template<typename T >
std::enable_if_t< std::is_scalar< T >::value, HashT > proteus::hashValue ( const T &  V)
inline

◆ init()

void proteus::init ( )

◆ internalize()

void proteus::internalize ( Module &  M,
StringRef  PreserveFunctionName 
)
inline

◆ isDebugOutputEnabled()

bool proteus::isDebugOutputEnabled ( )
inline

◆ isDeviceCompilation()

bool proteus::isDeviceCompilation ( Module &  M)
inline

◆ isDeviceKernel()

bool proteus::isDeviceKernel ( const Function *  F)
inline

◆ isFloatingPointKind()

bool proteus::isFloatingPointKind ( const IRType T)
inline

Returns true when T is a floating-point kind (Float or Double).

◆ isHostTargetModel()

bool proteus::isHostTargetModel ( TargetModelType  TargetModel)

◆ isIntegerKind()

bool proteus::isIntegerKind ( const IRType T)
inline

Returns true when T is an integer kind (Int1, Int16, Int32, or Int64).

◆ isScalarRuntimeConstantType()

bool proteus::isScalarRuntimeConstantType ( RuntimeConstantType  RCType)
inline

◆ launchKernelDirect() [1/2]

cudaError_t proteus::launchKernelDirect ( void *  KernelFunc,
dim3  GridDim,
dim3  BlockDim,
void **  KernelArgs,
uint64_t  ShmemSize,
CUstream  Stream 
)
inline

◆ launchKernelDirect() [2/2]

hipError_t proteus::launchKernelDirect ( void *  KernelFunc,
dim3  GridDim,
dim3  BlockDim,
void **  KernelArgs,
uint64_t  ShmemSize,
hipStream_t  Stream 
)
inline

◆ launchKernelFunction() [1/2]

cudaError_t proteus::launchKernelFunction ( CUfunction  KernelFunc,
dim3  GridDim,
dim3  BlockDim,
void **  KernelArgs,
uint64_t  ShmemSize,
CUstream  Stream 
)
inline

◆ launchKernelFunction() [2/2]

hipError_t proteus::launchKernelFunction ( hipFunction_t  KernelFunc,
dim3  GridDim,
dim3  BlockDim,
void **  KernelArgs,
uint64_t  ShmemSize,
hipStream_t  Stream 
)
inline

◆ linkModules()

std::unique_ptr< Module > proteus::linkModules ( LLVMContext &  Ctx,
SmallVector< std::unique_ptr< Module > >  LinkedModules 
)
inline

◆ logf()

template<typename T >
Var< float > proteus::logf ( const Var< T > &  R)

◆ max()

template<typename T >
std::enable_if_t< is_arithmetic_unref_v< T >, Var< remove_cvref_t< T > > > proteus::max ( const Var< T > &  L,
const Var< T > &  R 
)

◆ min()

template<typename T >
std::enable_if_t< is_arithmetic_unref_v< T >, Var< remove_cvref_t< T > > > proteus::min ( const Var< T > &  L,
const Var< T > &  R 
)

◆ operator%()

template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > proteus::operator% ( const T &  ConstValue,
const Var< U > &  V 
)

◆ operator*()

template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > proteus::operator* ( const T &  ConstValue,
const Var< U > &  V 
)

◆ operator+()

template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > proteus::operator+ ( const T &  ConstValue,
const Var< U > &  Var 
)

◆ operator-()

template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > proteus::operator- ( const T &  ConstValue,
const Var< U > &  V 
)

◆ operator/()

template<typename T , typename U >
std::enable_if_t< std::is_arithmetic_v< T > &&std::is_arithmetic_v< U >, Var< std::common_type_t< T, U > > > proteus::operator/ ( const T &  ConstValue,
const Var< U > &  V 
)

◆ optimizeIR() [1/2]

void proteus::optimizeIR ( Module &  M,
StringRef  Arch,
char  OptLevel,
unsigned  CodegenOptLevel 
)
inline

◆ optimizeIR() [2/2]

void proteus::optimizeIR ( Module &  M,
StringRef  Arch,
const std::string &  PassPipeline,
unsigned  CodegenOptLevel 
)
inline

◆ packStoreMessage()

std::vector< char > proteus::packStoreMessage ( MPI_Comm  Comm,
const HashT HashValue,
const CacheEntry Entry 
)

◆ parseJSONConfig()

llvm::StringMap< const CodeGenerationConfig > proteus::parseJSONConfig ( std::optional< std::string >  JSONFn)
inline

◆ parseTargetModel()

TargetModelType proteus::parseTargetModel ( const std::string &  Target)

◆ parseTraceConfig()

unsigned proteus::parseTraceConfig ( const char *  VarName)
inline

◆ powf()

template<typename T >
Var< float > proteus::powf ( const Var< float > &  L,
const Var< T > &  R 
)

◆ pruneIR()

void proteus::pruneIR ( Module &  M,
bool  UnsetExternallyInitialized = true 
)
inline

◆ reportFatalError() [1/4]

void proteus::reportFatalError ( const char *  Reason,
const char *  FILE,
unsigned  Line 
)

◆ reportFatalError() [2/4]

void proteus::reportFatalError ( const llvm::StringRef &  Reason,
const char *  FILE,
unsigned  Line 
)

◆ reportFatalError() [3/4]

void proteus::reportFatalError ( const llvm::Twine &  Reason,
const char *  FILE,
unsigned  Line 
)

◆ reportFatalError() [4/4]

void proteus::reportFatalError ( const std::string &  Reason,
const char *  FILE,
unsigned  Line 
)

◆ resolveDeviceGlobalAddr()

void * proteus::resolveDeviceGlobalAddr ( const void *  Addr)
inline

◆ runCleanupPassPipeline()

void proteus::runCleanupPassPipeline ( Module &  M)
inline

◆ setLaunchBoundsForKernel()

void proteus::setLaunchBoundsForKernel ( Function &  F,
int  MaxThreadsPerSM,
int  MinBlocksPerSM = 0 
)
inline

◆ sinf()

template<typename T >
Var< float > proteus::sinf ( const Var< T > &  R)

◆ sqrtf()

template<typename T >
Var< float > proteus::sqrtf ( const Var< T > &  R)

◆ strToCG()

CodegenOption proteus::strToCG ( std::string  CGstr)
inline

◆ toLLVM()

constexpr unsigned proteus::toLLVM ( AddressSpace  AS)
inlineconstexpr

◆ toLLVMType() [1/2]

llvm::Type * proteus::toLLVMType ( const IRType T,
llvm::LLVMContext &  Ctx 
)

Convert a backend-independent IRType descriptor to its corresponding llvm::Type*.

Parameters
TThe abstract type descriptor produced by TypeMap<T>::get().
CtxThe LLVM context to use when constructing the type.
Returns
The corresponding llvm::Type*, or nullptr when T represents an element type absent in the Pointer/Array descriptor (i.e. IRTypeKind::Void in that position).

◆ toLLVMType() [2/2]

llvm::Type * proteus::toLLVMType ( const IRType T,
LLVMContext &  Ctx 
)

◆ toString() [1/5]

std::string proteus::toString ( CodegenOption  Option)
inline

◆ toString() [2/5]

std::string proteus::toString ( const RuntimeConstantType  RCType)
inline

◆ toString() [3/5]

std::string proteus::toString ( KernelCloneOption  Option)
inline

◆ toString() [4/5]

std::string proteus::toString ( ScopeKind  Kind)
inline

◆ toString() [5/5]

std::string proteus::toString ( Value &  V)
inline

◆ truncf()

template<typename T >
Var< float > proteus::truncf ( const Var< T > &  R)

◆ unpackArgTypes()

template<typename... Ts>
std::vector< IRType > proteus::unpackArgTypes ( ArgTypeList< Ts... >  )

◆ unpackStoreMessage()

StoreMessage proteus::unpackStoreMessage ( MPI_Comm  Comm,
const std::vector< char > &  Buffer 
)

◆ validateMPIConfig()

void proteus::validateMPIConfig ( )

Variable Documentation

◆ __proteus_cudaGetSymbolAddress_ptr

cudaError_t(* proteus::__proteus_cudaGetSymbolAddress_ptr) (void **, const void *) ( void **  ,
const void *   
) = nullptr
inline

◆ __proteus_cudaLaunchKernel_ptr

cudaError_t(* proteus::__proteus_cudaLaunchKernel_ptr) (const void *, dim3, dim3, void **, size_t, cudaStream_t) ( const void *  ,
dim3  ,
dim3  ,
void **  ,
size_t  ,
cudaStream_t   
) = nullptr
inline

◆ is_arithmetic_unref_v

template<typename T >
constexpr bool proteus::is_arithmetic_unref_v
inlineconstexpr
Initial value:
=
std::is_arithmetic_v<std::remove_reference_t<T>>

◆ is_mutable_v

template<typename T >
constexpr bool proteus::is_mutable_v
inlineconstexpr
Initial value:
=
!std::is_const_v<std::remove_reference_t<T>>

◆ is_pointer_unref_v

template<typename T >
constexpr bool proteus::is_pointer_unref_v
inlineconstexpr
Initial value:
=
std::is_pointer_v<std::remove_reference_t<T>>

◆ is_scalar_arithmetic_v

template<typename T >
constexpr bool proteus::is_scalar_arithmetic_v
inlineconstexpr
Initial value:
=
std::is_arithmetic_v<std::remove_reference_t<T>> &&
!std::is_pointer_v<std::remove_reference_t<T>> &&
!std::is_array_v<std::remove_reference_t<T>>

◆ NumElts

size_t proteus::NumElts

◆ Offset

int int proteus::Offset = -1

◆ Pos

int proteus::Pos = -1

◆ TimeTracer

TimeTracerRAII proteus::TimeTracer

◆ Velem

size_t std::remove_pointer<T>::type proteus::Velem = 0) noexcept