MLIR  20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | List of all members
mlir::DialectResourceBlobHandle< DialectT > Struct Template Reference

This class defines a dialect specific handle to a resource blob. More...

#include "mlir/IR/DialectResourceBlobManager.h"

+ Inheritance diagram for mlir::DialectResourceBlobHandle< DialectT >:

Public Types

using ManagerInterface = ResourceBlobManagerDialectInterfaceBase< DialectResourceBlobHandle< DialectT > >
 
- Public Types inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
using Dialect = DialectT
 

Public Member Functions

StringRef getKey () const
 Return the human readable string key for this handle. More...
 
AsmResourceBlobgetBlob ()
 Return the blob referenced by this handle if the underlying resource has been initialized. More...
 
const AsmResourceBlobgetBlob () const
 
- Public Member Functions inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
 AsmDialectResourceHandleBase (DialectResourceBlobManager::BlobEntry *resource, DialectT *dialect)
 Construct a handle from a pointer to the resource. More...
 
 AsmDialectResourceHandleBase (AsmDialectResourceHandle handle)
 
DialectResourceBlobManager::BlobEntrygetResource ()
 Return the resource referenced by this handle. More...
 
const DialectResourceBlobManager::BlobEntrygetResource () const
 
DialectT * getDialect () const
 Return the dialect that owns the resource. More...
 
- Public Member Functions inherited from mlir::AsmDialectResourceHandle
 AsmDialectResourceHandle ()=default
 
 AsmDialectResourceHandle (void *resource, TypeID resourceID, Dialect *dialect)
 
bool operator== (const AsmDialectResourceHandle &other) const
 
void * getResource () const
 Return an opaque pointer to the referenced resource. More...
 
TypeID getTypeID () const
 Return the type ID of the resource. More...
 
DialectgetDialect () const
 Return the dialect that owns the resource. More...
 

Static Public Member Functions

static ManagerInterfacegetManagerInterface (MLIRContext *ctx)
 Get the interface for the dialect that owns handles of this type. More...
 
- Static Public Member Functions inherited from mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >
static bool classof (const AsmDialectResourceHandle *handle)
 Support llvm style casting. More...
 

Detailed Description

template<typename DialectT>
struct mlir::DialectResourceBlobHandle< DialectT >

This class defines a dialect specific handle to a resource blob.

These handles utilize a StringRef for the internal key, and an AsmResourceBlob as the underlying data.

Definition at line 182 of file DialectResourceBlobManager.h.

Member Typedef Documentation

◆ ManagerInterface

Definition at line 189 of file DialectResourceBlobManager.h.

Member Function Documentation

◆ getBlob() [1/2]

template<typename DialectT >
AsmResourceBlob* mlir::DialectResourceBlobHandle< DialectT >::getBlob ( )
inline

Return the blob referenced by this handle if the underlying resource has been initialized.

Returns nullptr otherwise.

Definition at line 197 of file DialectResourceBlobManager.h.

References mlir::DialectResourceBlobManager::BlobEntry::getBlob(), and mlir::AsmDialectResourceHandleBase< DialectResourceBlobHandle< DialectT >, DialectResourceBlobManager::BlobEntry, DialectT >::getResource().

◆ getBlob() [2/2]

template<typename DialectT >
const AsmResourceBlob* mlir::DialectResourceBlobHandle< DialectT >::getBlob ( ) const
inline

◆ getKey()

template<typename DialectT >
StringRef mlir::DialectResourceBlobHandle< DialectT >::getKey ( ) const
inline

◆ getManagerInterface()

template<typename DialectT >
static ManagerInterface& mlir::DialectResourceBlobHandle< DialectT >::getManagerInterface ( MLIRContext ctx)
inlinestatic

Get the interface for the dialect that owns handles of this type.

Asserts that the dialect is registered.

Definition at line 204 of file DialectResourceBlobManager.h.

References mlir::MLIRContext::getOrLoadDialect().

Referenced by mlir::NVVM::SerializeGPUModuleBase::appendStandardLibs().


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