|
MLIR
22.0.0git
|
#include "mlir/CAPI/Support.h"#include "llvm/ADT/StringRef.h"#include "llvm/Support/ThreadPool.h"#include <cstring>Go to the source code of this file.
Functions | |
| MlirStringRef | mlirStringRefCreateFromCString (const char *str) |
| Constructs a string reference from a null-terminated C string. More... | |
| bool | mlirStringRefEqual (MlirStringRef string, MlirStringRef other) |
| Returns true if two string references are equal, false otherwise. More... | |
| MlirLlvmThreadPool | mlirLlvmThreadPoolCreate () |
| Create an LLVM thread pool. More... | |
| void | mlirLlvmThreadPoolDestroy (MlirLlvmThreadPool threadPool) |
| Destroy an LLVM thread pool. More... | |
| MlirTypeID | mlirTypeIDCreate (const void *ptr) |
ptr must be 8 byte aligned and unique to a type valid for the duration of the returned type id's usage More... | |
| bool | mlirTypeIDEqual (MlirTypeID typeID1, MlirTypeID typeID2) |
| Checks if two type ids are equal. More... | |
| size_t | mlirTypeIDHashValue (MlirTypeID typeID) |
| Returns the hash value of the type id. More... | |
| MlirTypeIDAllocator | mlirTypeIDAllocatorCreate () |
| Creates a type id allocator for dynamic type id creation. More... | |
| void | mlirTypeIDAllocatorDestroy (MlirTypeIDAllocator allocator) |
| Deallocates the allocator and all allocated type ids. More... | |
| MlirTypeID | mlirTypeIDAllocatorAllocateTypeID (MlirTypeIDAllocator allocator) |
| Allocates a type id that is valid for the lifetime of the allocator. More... | |
| MlirLlvmThreadPool mlirLlvmThreadPoolCreate | ( | void | ) |
Create an LLVM thread pool.
This is reexported here to avoid directly pulling in the LLVM headers directly.
Definition at line 27 of file Support.cpp.
References wrap().
| void mlirLlvmThreadPoolDestroy | ( | MlirLlvmThreadPool | threadPool | ) |
Destroy an LLVM thread pool.
Definition at line 31 of file Support.cpp.
| MlirStringRef mlirStringRefCreateFromCString | ( | const char * | str | ) |
Constructs a string reference from a null-terminated C string.
Prefer mlirStringRefCreate if the length of the string is known.
Definition at line 15 of file Support.cpp.
References mlirStringRefCreate().
| bool mlirStringRefEqual | ( | MlirStringRef | string, |
| MlirStringRef | other | ||
| ) |
Returns true if two string references are equal, false otherwise.
Definition at line 19 of file Support.cpp.
References MlirStringRef::data, and MlirStringRef::length.
| MlirTypeID mlirTypeIDAllocatorAllocateTypeID | ( | MlirTypeIDAllocator | allocator | ) |
Allocates a type id that is valid for the lifetime of the allocator.
Definition at line 67 of file Support.cpp.
References unwrap(), and wrap().
Referenced by mlir::python::PyGlobals::TypeIDAllocator::allocate().
| MlirTypeIDAllocator mlirTypeIDAllocatorCreate | ( | void | ) |
Creates a type id allocator for dynamic type id creation.
Definition at line 59 of file Support.cpp.
References wrap().
| void mlirTypeIDAllocatorDestroy | ( | MlirTypeIDAllocator | allocator | ) |
Deallocates the allocator and all allocated type ids.
Definition at line 63 of file Support.cpp.
References unwrap().
Referenced by mlir::python::PyGlobals::TypeIDAllocator::~TypeIDAllocator().
| MlirTypeID mlirTypeIDCreate | ( | const void * | ptr | ) |
ptr must be 8 byte aligned and unique to a type valid for the duration of the returned type id's usage
Definition at line 38 of file Support.cpp.
References mlir::TypeID::getFromOpaquePointer(), and wrap().
Referenced by llvm::DenseMapInfo< MlirTypeID >::getEmptyKey(), and llvm::DenseMapInfo< MlirTypeID >::getTombstoneKey().
| bool mlirTypeIDEqual | ( | MlirTypeID | typeID1, |
| MlirTypeID | typeID2 | ||
| ) |
Checks if two type ids are equal.
Definition at line 47 of file Support.cpp.
References unwrap().
Referenced by llvm::DenseMapInfo< MlirTypeID >::isEqual(), and mlir::python::PyTypeID::operator==().
| size_t mlirTypeIDHashValue | ( | MlirTypeID | typeID | ) |
Returns the hash value of the type id.
Definition at line 51 of file Support.cpp.
References mlir::spirv::hash_value(), and unwrap().
Referenced by llvm::DenseMapInfo< MlirTypeID >::getHashValue().