Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#4963 from The-OpenROAD-Projec…
Browse files Browse the repository at this point in the history
…t-staging/odb-include2

Odb include2
  • Loading branch information
maliberty authored Apr 17, 2024
2 parents ed2f872 + 53b126f commit da0053d
Show file tree
Hide file tree
Showing 68 changed files with 186 additions and 187 deletions.
4 changes: 2 additions & 2 deletions src/odb/src/codeGenerator/schema/tech/dbTechLayer.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
}
],
"h_includes": [
"dbMatrix.h",
"dbTypes.h",
"odb/dbMatrix.h",
"odb/dbTypes.h",
"dbVector.h"
]
}
4 changes: 2 additions & 2 deletions src/odb/src/db/dbArrayTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@

#include <vector>

#include "ZException.h"
#include "dbCore.h"
#include "dbVector.h"
#include "odb.h"
#include "odb/ZException.h"
#include "odb/odb.h"

namespace odb {

Expand Down
36 changes: 18 additions & 18 deletions src/odb/src/db/dbArrayTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@
#include <cstring>
#include <new>

#include "ZException.h"
#include "dbArrayTable.h"
#include "dbDiff.h"
#include "dbStream.h"
#include "odb/ZException.h"
#include "odb/dbDiff.h"
#include "odb/dbStream.h"

namespace odb {
template <class T>
Expand Down Expand Up @@ -108,15 +108,15 @@ void dbArrayTable<T>::clear()
for (; t < e; t++) {
if (t->_oid & DB_ALLOC_BIT) {
t->~T();
}
}
}

free((void*) page);
}

{
{
delete[] _pages;
}
}

_page_cnt = 0;
_page_tbl_size = 0;
Expand Down Expand Up @@ -180,11 +180,11 @@ void dbArrayTable<T>::resizePageTbl()

for (i = 0; i < old_tbl_size; ++i) {
_pages[i] = old_tbl[i];
}
}

for (; i < _page_tbl_size; ++i) {
_pages[i] = nullptr;
}
}

delete[] old_tbl;
}
Expand Down Expand Up @@ -224,7 +224,7 @@ void dbArrayTable<T>::newPage()

if (t != b) { // don't link zero-object
pushQ(_free_list, o);
}
}
}
} else {
T* b = (T*) page->_objects;
Expand All @@ -245,7 +245,7 @@ T* dbArrayTable<T>::create()

if (_free_list == 0) {
newPage();
}
}

_dbFreeObject* o = popQ(_free_list);
o->_oid |= DB_ALLOC_BIT;
Expand Down Expand Up @@ -286,7 +286,7 @@ void dbArrayTable<T>::destroyArray(dbId<T> id)
// freelist in the correct order.
for (; i >= id; --i) {
destroy(getPtr(i));
}
}
}

template <class T>
Expand Down Expand Up @@ -369,7 +369,7 @@ void dbArrayTable<T>::copy_pages(const dbArrayTable<T>& t)

for (i = 0; i < _page_tbl_size; ++i) {
_pages[i] = nullptr;
}
}

for (i = 0; i < _page_cnt; ++i) {
dbArrayTablePage* page = t._pages[i];
Expand Down Expand Up @@ -455,7 +455,7 @@ dbIStream& operator>>(dbIStream& stream, dbArrayTable<T>& table)

for (; i < table._page_tbl_size; ++i) {
table._pages[i] = nullptr;
}
}

return stream;
}
Expand All @@ -478,17 +478,17 @@ bool dbArrayTable<T>::operator==(const dbArrayTable<T>& rhs) const
// empty tables
if ((lhs._page_cnt == 0) && (rhs._page_cnt == 0)) {
return true;
}
}

// Simple rejection test
if (lhs._page_cnt != rhs._page_cnt) {
return false;
}
}

// Simple rejection test
if (lhs._alloc_cnt != rhs._alloc_cnt) {
return false;
}
}

uint i;

Expand All @@ -502,7 +502,7 @@ bool dbArrayTable<T>::operator==(const dbArrayTable<T>& rhs) const

if (*l != *r) {
return false;
}
}
} else if (lhs_valid_o) {
return false;
} else if (rhs_valid_o) {
Expand Down Expand Up @@ -574,7 +574,7 @@ void dbArrayTable<T>::getObjects(std::vector<T*>& objects)
for (i = 1; i < _alloc_cnt; ++i) {
if (validId(i)) {
objects.push_back(getPtr(i));
}
}
}
}

Expand Down
10 changes: 5 additions & 5 deletions src/odb/src/db/dbBTerm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,14 @@

#include "dbBTerm.h"

#include "db.h"
#include "dbArrayTable.h"
#include "dbBPinItr.h"
#include "dbBlock.h"
#include "dbBlockCallBackObj.h"
#include "dbBox.h"
#include "dbBoxItr.h"
#include "dbChip.h"
#include "dbCommon.h"
#include "dbDatabase.h"
#include "dbDiff.h"
#include "dbDiff.hpp"
#include "dbHier.h"
#include "dbITerm.h"
Expand All @@ -53,10 +50,13 @@
#include "dbMaster.h"
#include "dbModNet.h"
#include "dbNet.h"
#include "dbShape.h"
#include "dbTable.h"
#include "dbTable.hpp"
#include "dbTransform.h"
#include "odb/db.h"
#include "odb/dbBlockCallBackObj.h"
#include "odb/dbDiff.h"
#include "odb/dbShape.h"
#include "odb/dbTransform.h"
#include "utl/Logger.h"

namespace odb {
Expand Down
6 changes: 3 additions & 3 deletions src/odb/src/db/dbBTerm.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

#include "dbCore.h"
#include "dbDatabase.h"
#include "dbId.h"
#include "dbTypes.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/dbTypes.h"
#include "odb/odb.h"

namespace odb {

Expand Down
16 changes: 8 additions & 8 deletions src/odb/src/db/dbBlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,13 @@
#include <set>
#include <string>

#include "db.h"
#include "dbAccessPoint.h"
#include "dbArrayTable.h"
#include "dbArrayTable.hpp"
#include "dbBPin.h"
#include "dbBPinItr.h"
#include "dbBTerm.h"
#include "dbBTermItr.h"
#include "dbBlockCallBackObj.h"
#include "dbBlockItr.h"
#include "dbBlockage.h"
#include "dbBox.h"
Expand All @@ -60,9 +58,7 @@
#include "dbChip.h"
#include "dbDatabase.h"
#include "dbDft.h"
#include "dbDiff.h"
#include "dbDiff.hpp"
#include "dbExtControl.h"
#include "dbFill.h"
#include "dbGCellGrid.h"
#include "dbGlobalConnect.h"
Expand Down Expand Up @@ -118,7 +114,6 @@
#include "dbSBoxItr.h"
#include "dbSWire.h"
#include "dbSWireItr.h"
#include "dbShape.h"
#include "dbTable.h"
#include "dbTable.hpp"
#include "dbTech.h"
Expand All @@ -128,9 +123,14 @@
#include "dbTrackGrid.h"
#include "dbVia.h"
#include "dbWire.h"
#include "defout.h"
#include "lefout.h"
#include "parse.h"
#include "odb/db.h"
#include "odb/dbBlockCallBackObj.h"
#include "odb/dbDiff.h"
#include "odb/dbExtControl.h"
#include "odb/dbShape.h"
#include "odb/defout.h"
#include "odb/lefout.h"
#include "odb/parse.h"
#include "utl/Logger.h"

namespace odb {
Expand Down
8 changes: 4 additions & 4 deletions src/odb/src/db/dbBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@
#include "dbHashTable.h"
#include "dbIntHashTable.h"
#include "dbPagedVector.h"
#include "dbTransform.h"
#include "dbTypes.h"
#include "dbVector.h"
#include "geom.h"
#include "odb.h"
#include "odb/dbTransform.h"
#include "odb/dbTypes.h"
#include "odb/geom.h"
#include "odb/odb.h"

namespace odb {

Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbBlockCallBackObj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

#include "dbBlockCallBackObj.h"
#include "odb/dbBlockCallBackObj.h"

#include "dbBlock.h"

Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbBlockage.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
#pragma once

#include "dbCore.h"
#include "dbId.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/odb.h"

namespace odb {

Expand Down
6 changes: 3 additions & 3 deletions src/odb/src/db/dbCCSeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

#include "dbCore.h"
#include "dbDatabase.h"
#include "dbId.h"
#include "dbTypes.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/dbTypes.h"
#include "odb/odb.h"

namespace odb {

Expand Down
6 changes: 3 additions & 3 deletions src/odb/src/db/dbCapNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@

#include "dbCore.h"
#include "dbDatabase.h"
#include "dbId.h"
#include "dbTypes.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/dbTypes.h"
#include "odb/odb.h"

namespace odb {

Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbCapNodeItr.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

#pragma once

#include "dbIterator.h"
#include "odb.h"
#include "odb/dbIterator.h"
#include "odb/odb.h"

namespace odb {

Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbChip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@

#include "dbChip.h"

#include "db.h"
#include "dbBlock.h"
#include "dbBlockItr.h"
#include "dbDatabase.h"
Expand All @@ -42,6 +41,7 @@
#include "dbTable.h"
#include "dbTable.hpp"
#include "dbTech.h"
#include "odb/db.h"

namespace odb {

Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbChip.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#pragma once

#include "dbCore.h"
#include "odb.h"
#include "odb/odb.h"

namespace odb {

Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbDiff.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

#include <algorithm>

#include "dbSet.h"
#include "odb/dbSet.h"

namespace odb {
//
Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbExtControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

#include "dbExtControl.h"
#include "odb/dbExtControl.h"

#include "db.h"
#include "dbDatabase.h"
#include "odb/db.h"

namespace odb {

Expand Down
6 changes: 3 additions & 3 deletions src/odb/src/db/dbFill.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#pragma once

#include "dbCore.h"
#include "dbId.h"
#include "dbTypes.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/dbTypes.h"
#include "odb/odb.h"

namespace odb {

Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbHier.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#pragma once

#include "dbCore.h"
#include "dbId.h"
#include "dbVector.h"
#include "odb.h"
#include "odb/dbId.h"
#include "odb/odb.h"

namespace odb {

Expand Down
Loading

0 comments on commit da0053d

Please sign in to comment.