MLIR  20.0.0git
Classes | Public Member Functions | List of all members
mlir::ThreadLocalCache< ValueT > Class Template Reference

This class provides support for defining a thread local object with non static storage duration. More...

#include "mlir/Support/ThreadLocalCache.h"

+ Inheritance diagram for mlir::ThreadLocalCache< ValueT >:

Public Member Functions

 ThreadLocalCache ()=default
 
 ~ThreadLocalCache ()
 
ValueT & get ()
 Return an instance of the value type for the current thread. More...
 
ValueT & operator* ()
 
ValueT * operator-> ()
 

Detailed Description

template<typename ValueT>
class mlir::ThreadLocalCache< ValueT >

This class provides support for defining a thread local object with non static storage duration.

This is very useful for situations in which a data cache has very large lock contention.

Definition at line 27 of file ThreadLocalCache.h.

Constructor & Destructor Documentation

◆ ThreadLocalCache()

template<typename ValueT >
mlir::ThreadLocalCache< ValueT >::ThreadLocalCache ( )
default

◆ ~ThreadLocalCache()

template<typename ValueT >
mlir::ThreadLocalCache< ValueT >::~ThreadLocalCache ( )
inline

Definition at line 141 of file ThreadLocalCache.h.

Member Function Documentation

◆ get()

template<typename ValueT >
ValueT& mlir::ThreadLocalCache< ValueT >::get ( )
inline

Return an instance of the value type for the current thread.

Definition at line 147 of file ThreadLocalCache.h.

Referenced by mlir::detail::DistinctAttributeAllocator::allocate(), mlir::ThreadLocalCache< ValueT >::operator*(), and mlir::ThreadLocalCache< ValueT >::operator->().

◆ operator*()

template<typename ValueT >
ValueT& mlir::ThreadLocalCache< ValueT >::operator* ( )
inline

Definition at line 168 of file ThreadLocalCache.h.

References mlir::ThreadLocalCache< ValueT >::get().

◆ operator->()

template<typename ValueT >
ValueT* mlir::ThreadLocalCache< ValueT >::operator-> ( )
inline

Definition at line 169 of file ThreadLocalCache.h.

References mlir::ThreadLocalCache< ValueT >::get().


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