CIRCT  20.0.0git
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
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:
Collaboration graph
[legend]

Public Member Functions

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

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

DimPrimitiveTypegetLeaf (PhysLocationAttr)
 Get the leaf node. More...
 

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 esiaccel.accelerator::ctxt, and circt::calyx::direction::get().

Referenced by 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.

◆ 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.

◆ placements

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

Definition at line 52 of file DeviceDB.h.


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