My Project
Public Member Functions | List of all members
mlir::StorageUniquer::StorageAllocator Class Reference

#include <StorageUniquer.h>

Public Member Functions

template<typename T >
ArrayRef< T > copyInto (ArrayRef< T > elements)
 
StringRef copyInto (StringRef str)
 
template<typename T >
T * allocate ()
 Allocate an instance of the provided type. More...
 
void * allocate (size_t size, size_t alignment)
 Allocate 'size' bytes of 'alignment' aligned memory. More...
 

Detailed Description

This is a utility allocator used to allocate memory for instances of derived types.

Member Function Documentation

◆ allocate() [1/2]

template<typename T >
T* mlir::StorageUniquer::StorageAllocator::allocate ( )
inline

Allocate an instance of the provided type.

◆ allocate() [2/2]

void* mlir::StorageUniquer::StorageAllocator::allocate ( size_t  size,
size_t  alignment 
)
inline

Allocate 'size' bytes of 'alignment' aligned memory.

◆ copyInto() [1/2]

template<typename T >
ArrayRef<T> mlir::StorageUniquer::StorageAllocator::copyInto ( ArrayRef< T >  elements)
inline

Copy the specified array of elements into memory managed by our bump pointer allocator. This assumes the elements are all PODs.

◆ copyInto() [2/2]

StringRef mlir::StorageUniquer::StorageAllocator::copyInto ( StringRef  str)
inline

Copy the provided string into memory managed by our bump pointer allocator.


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