CIRCT  18.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
circt::moore::detail::DimStorage Struct Reference
Inheritance diagram for circt::moore::detail::DimStorage:
Inheritance graph
Collaboration diagram for circt::moore::detail::DimStorage:
Collaboration graph

Public Types

using KeyTy = UnpackedType

Public Member Functions

 DimStorage (KeyTy key)
bool operator== (const KeyTy &key) const
LogicalResult mutate (TypeStorageAllocator &allocator, UnpackedType newResolved, UnpackedType newFullyResolved)
template<class ConcreteDim , typename... Args>
void finalize (ConcreteDim dim, Args... args) const
 Each dimension type calls this function from its get method. More...

Static Public Member Functions

static DimStorageconstruct (TypeStorageAllocator &allocator, const KeyTy &key)

Public Attributes

UnpackedType inner
UnpackedType resolved
UnpackedType fullyResolved

Detailed Description

Definition at line 643 of file MooreTypes.cpp.

Member Typedef Documentation

◆ KeyTy

Definition at line 644 of file MooreTypes.cpp.

Constructor & Destructor Documentation

◆ DimStorage()

circt::moore::detail::DimStorage::DimStorage ( KeyTy  key)

Definition at line 646 of file MooreTypes.cpp.

Referenced by construct().

Member Function Documentation

◆ construct()

static DimStorage* circt::moore::detail::DimStorage::construct ( TypeStorageAllocator &  allocator,
const KeyTy key 

Definition at line 648 of file MooreTypes.cpp.

References DimStorage().

◆ finalize()

template<class ConcreteDim , typename... Args>
void circt::moore::detail::DimStorage::finalize ( ConcreteDim  dim,
Args...  args 
) const

Each dimension type calls this function from its get method.

The first argument, dim, is set to the type that was constructed by the call to Base::get. If that type has just been created, its resolved and fullyResolved fields are not yet set. If that is the case, the finalize method constructs the these resolved types by resolving the inner type appropriately and wrapping it in the dimension type. These wrapped types, which are equivalent to the dim itself but with the inner type resolved, are passed to DimStorage::mutate which fills in the resolved and fullyResolved fields behind a storage lock in the MLIRContext.

This has been inspired by

Definition at line 682 of file MooreTypes.cpp.

References assert(), circt::moore::UnpackedType::fullyResolved(), fullyResolved, circt::calyx::direction::get(), inner, circt::moore::UnpackedType::resolved(), and resolved.

◆ mutate()

LogicalResult circt::moore::detail::DimStorage::mutate ( TypeStorageAllocator &  allocator,
UnpackedType  newResolved,
UnpackedType  newFullyResolved 

Definition at line 654 of file MooreTypes.cpp.

References fullyResolved, and resolved.

◆ operator==()

bool circt::moore::detail::DimStorage::operator== ( const KeyTy key) const

Definition at line 647 of file MooreTypes.cpp.

References inner.

Member Data Documentation

◆ fullyResolved

UnpackedType circt::moore::detail::DimStorage::fullyResolved

◆ inner

UnpackedType circt::moore::detail::DimStorage::inner

◆ resolved

UnpackedType circt::moore::detail::DimStorage::resolved

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