CIRCT
20.0.0git
|
A data structure to contain locations of the primitives on the device. More...
#include <DeviceDB.h>
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 | |
DimPrimitiveType & | getLeaf (PhysLocationAttr) |
Get the leaf node. More... | |
Private Attributes | |
DimXMap | placements |
MLIRContext * | ctxt |
A data structure to contain locations of the primitives on the device.
Definition at line 27 of file DeviceDB.h.
|
private |
Definition at line 43 of file DeviceDB.h.
|
private |
Definition at line 42 of file DeviceDB.h.
|
private |
Definition at line 45 of file DeviceDB.h.
|
private |
Definition at line 44 of file DeviceDB.h.
circt::msft::PrimitiveDB::PrimitiveDB | ( | MLIRContext * | ) |
Create a DB treating 'top' as the root module.
LogicalResult circt::msft::PrimitiveDB::addPrimitive | ( | PhysLocationAttr | ) |
Place a primitive at a location.
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().
|
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.
bool circt::msft::PrimitiveDB::isValidLocation | ( | PhysLocationAttr | ) |
Check to see if a primitive exists.
|
private |
Definition at line 53 of file DeviceDB.h.
|
private |
Definition at line 52 of file DeviceDB.h.