CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::msft::PrimitiveDB Class Reference

A data structure to contain locations of the primitives on the device. More...

#include <DeviceDB.h>

Collaboration diagram for circt::msft::PrimitiveDB:

Public Member Functions

 PrimitiveDB (MLIRContext *)
 Create a DB treating 'top' as the root module.
LogicalResult addPrimitive (PhysLocationAttr)
 Place a primitive at a location.
bool isValidLocation (PhysLocationAttr)
 Check to see if a primitive exists.
void foreach (function_ref< void(PhysLocationAttr)> callback) const
 Iterate over all the primitive locations, executing 'callback' on each one.

Private Types

using DimPrimitiveType = DenseSet<PrimitiveType>
using DimNumMap = DenseMap<size_t, DimPrimitiveType>
using DimYMap = DenseMap<size_t, DimNumMap>
using DimXMap = DenseMap<size_t, DimYMap>

Private Member Functions

DimPrimitiveType & getLeaf (PhysLocationAttr)
 Get the leaf node.

Private Attributes

DimXMap placements
MLIRContext * ctxt

Detailed Description

A data structure to contain locations of the primitives on the device.

Definition at line 27 of file DeviceDB.h.

Member Typedef Documentation

◆ DimNumMap

using circt::msft::PrimitiveDB::DimNumMap = DenseMap<size_t, DimPrimitiveType>
private

Definition at line 43 of file DeviceDB.h.

◆ DimPrimitiveType

using circt::msft::PrimitiveDB::DimPrimitiveType = DenseSet<PrimitiveType>
private

Definition at line 42 of file DeviceDB.h.

◆ DimXMap

using circt::msft::PrimitiveDB::DimXMap = DenseMap<size_t, DimYMap>
private

Definition at line 45 of file DeviceDB.h.

◆ DimYMap

using circt::msft::PrimitiveDB::DimYMap = DenseMap<size_t, DimNumMap>
private

Definition at line 44 of file DeviceDB.h.

Constructor & Destructor Documentation

◆ PrimitiveDB()

circt::msft::PrimitiveDB::PrimitiveDB ( MLIRContext * )

Create a DB treating 'top' as the root module.

Member Function Documentation

◆ addPrimitive()

LogicalResult circt::msft::PrimitiveDB::addPrimitive ( PhysLocationAttr )

Place a primitive at a location.

◆ foreach()

void PrimitiveDB::foreach ( function_ref< void(PhysLocationAttr)> callback) const

Iterate over all the primitive locations, executing 'callback' on each one.

Definition at line 53 of file DeviceDB.cpp.

References ctxt, foreach(), and placements.

Referenced by foreach(), and circt::msft::PlacementDB::PlacementDB().

◆ getLeaf()

PrimitiveDB::DimPrimitiveType & PrimitiveDB::getLeaf ( PhysLocationAttr loc)
private

Get the leaf node.

Abstract this out to make it easier to change the underlying data structure.

Definition at line 49 of file DeviceDB.cpp.

References getLeaf(), and placements.

Referenced by getLeaf().

◆ isValidLocation()

bool circt::msft::PrimitiveDB::isValidLocation ( PhysLocationAttr )

Check to see if a primitive exists.

Member Data Documentation

◆ ctxt

MLIRContext* circt::msft::PrimitiveDB::ctxt
private

Definition at line 53 of file DeviceDB.h.

Referenced by foreach(), and esiaccel.accelerator.AcceleratorConnection::manifest().

◆ placements

DimXMap circt::msft::PrimitiveDB::placements
private

Definition at line 52 of file DeviceDB.h.

Referenced by foreach(), and getLeaf().


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