MLIR  19.0.0git
Static Public Member Functions | List of all members
mlir::HeapAsmResourceBlob Class Reference

This class provides a simple utility wrapper for creating heap allocated AsmResourceBlobs. More...

#include "mlir/IR/AsmState.h"

Static Public Member Functions

static AsmResourceBlob allocate (size_t size, size_t align, bool dataIsMutable=true)
 Create a new heap allocated blob with the given size and alignment. More...
 
static AsmResourceBlob allocateAndCopyWithAlign (ArrayRef< char > data, size_t align, bool dataIsMutable=true)
 Create a new heap allocated blob and copy the provided data into it. More...
 
template<typename T >
static AsmResourceBlob allocateAndCopyInferAlign (ArrayRef< T > data, bool dataIsMutable=true)
 

Detailed Description

This class provides a simple utility wrapper for creating heap allocated AsmResourceBlobs.

Definition at line 184 of file AsmState.h.

Member Function Documentation

◆ allocate()

static AsmResourceBlob mlir::HeapAsmResourceBlob::allocate ( size_t  size,
size_t  align,
bool  dataIsMutable = true 
)
inlinestatic

Create a new heap allocated blob with the given size and alignment.

dataIsMutable indicates if the allocated data can be mutated. By default, we treat heap allocated blobs as mutable.

Definition at line 189 of file AsmState.h.

Referenced by allocateAndCopyWithAlign(), and mlir::AsmParsedResourceEntry::parseAsBlob().

◆ allocateAndCopyInferAlign()

template<typename T >
static AsmResourceBlob mlir::HeapAsmResourceBlob::allocateAndCopyInferAlign ( ArrayRef< T >  data,
bool  dataIsMutable = true 
)
inlinestatic

Definition at line 204 of file AsmState.h.

References allocateAndCopyWithAlign().

◆ allocateAndCopyWithAlign()

static AsmResourceBlob mlir::HeapAsmResourceBlob::allocateAndCopyWithAlign ( ArrayRef< char >  data,
size_t  align,
bool  dataIsMutable = true 
)
inlinestatic

Create a new heap allocated blob and copy the provided data into it.

Definition at line 196 of file AsmState.h.

References allocate(), and mlir::AsmResourceBlob::getMutableData().

Referenced by allocateAndCopyInferAlign().


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