summaryrefslogtreecommitdiffstats
path: root/src/phys
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/phys
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/phys')
-rw-r--r--src/phys/place/libhmetis.h8
-rw-r--r--src/phys/place/place_base.c5
-rw-r--r--src/phys/place/place_base.h8
-rw-r--r--src/phys/place/place_bin.c5
-rw-r--r--src/phys/place/place_genqp.c7
-rw-r--r--src/phys/place/place_gordian.c5
-rw-r--r--src/phys/place/place_gordian.h8
-rw-r--r--src/phys/place/place_inc.c5
-rw-r--r--src/phys/place/place_io.c5
-rw-r--r--src/phys/place/place_legalize.c5
-rw-r--r--src/phys/place/place_pads.c5
-rw-r--r--src/phys/place/place_partition.c5
-rw-r--r--src/phys/place/place_qpsolver.c5
-rw-r--r--src/phys/place/place_qpsolver.h8
-rw-r--r--src/phys/place/place_test.c5
15 files changed, 88 insertions, 1 deletions
diff --git a/src/phys/place/libhmetis.h b/src/phys/place/libhmetis.h
index 051079d4..277299b8 100644
--- a/src/phys/place/libhmetis.h
+++ b/src/phys/place/libhmetis.h
@@ -3,6 +3,10 @@
#ifndef LIBHMETIS_H_
#define LIBHMETIS_H_
+
+ABC_NAMESPACE_HEADER_START
+
+
static void HMETIS_PartRecursive(int nvtxs,
int nhedges,
int *vwgts,
@@ -28,4 +32,8 @@ static void HMETIS_PartKway(int nvtxs,
int *part,
int *edgecnt ) {} //;
+
+
+ABC_NAMESPACE_HEADER_END
+
#endif
diff --git a/src/phys/place/place_base.c b/src/phys/place/place_base.c
index 4e38f1d1..ef5aca56 100644
--- a/src/phys/place/place_base.c
+++ b/src/phys/place/place_base.c
@@ -15,6 +15,9 @@
#include "place_base.h"
#include "place_gordian.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// Global variables
//
@@ -343,3 +346,5 @@ int cellSortByID(const void *a, const void *b) {
if (pa->m_id > pb->m_id) return 1;
return 0;
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_base.h b/src/phys/place/place_base.h
index e5e7ecef..ed15ef22 100644
--- a/src/phys/place/place_base.h
+++ b/src/phys/place/place_base.h
@@ -10,6 +10,10 @@
#if !defined(PLACE_BASE_H_)
#define PLACE_BASE_H_
+
+ABC_NAMESPACE_HEADER_START
+
+
// --------------------------------------------------------------------
// Data structures
//
@@ -134,4 +138,8 @@ int cellSortByX(const void *a, const void *b);
int cellSortByY(const void *a, const void *b);
int cellSortByID(const void *a, const void *b);
+
+
+ABC_NAMESPACE_HEADER_END
+
#endif
diff --git a/src/phys/place/place_bin.c b/src/phys/place/place_bin.c
index 86ec3506..92b283cc 100644
--- a/src/phys/place/place_bin.c
+++ b/src/phys/place/place_bin.c
@@ -17,6 +17,9 @@
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// Global variables
//
@@ -275,3 +278,5 @@ void spreadDensityY(int numBins, float maxMovement) {
free(binCells);
free(allCells);
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_genqp.c b/src/phys/place/place_genqp.c
index 5b6c7027..3418ffcf 100644
--- a/src/phys/place/place_genqp.c
+++ b/src/phys/place/place_genqp.c
@@ -17,6 +17,9 @@
#include "place_qpsolver.h"
#include "place_gordian.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// Global variables
//
@@ -181,7 +184,7 @@ typedef struct reverseCOG {
//
// --------------------------------------------------------------------
int generateCoGConstraints(reverseCOG COG_rev[]) {
- int numConstraints = 0; // actual num contraints
+ int numConstraints = 0; // actual num constraints
int cogRevNum = 0;
Partition **stack = malloc(sizeof(Partition*)*g_place_numPartitions*2);
int stackPtr = 0;
@@ -307,3 +310,5 @@ void solveQuadraticProblem(bool useCOG) {
free(COG_rev);
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_gordian.c b/src/phys/place/place_gordian.c
index 2929bf95..0fd27e46 100644
--- a/src/phys/place/place_gordian.c
+++ b/src/phys/place/place_gordian.c
@@ -16,6 +16,9 @@
#include "place_gordian.h"
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// Global variables
@@ -158,3 +161,5 @@ void sanitizePlacement() {
cell->m_y = y;
}
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_gordian.h b/src/phys/place/place_gordian.h
index 67eb1479..6be6d907 100644
--- a/src/phys/place/place_gordian.h
+++ b/src/phys/place/place_gordian.h
@@ -10,9 +10,13 @@
#if !defined(PLACE_GORDIAN_H_)
#define PLACE_GORDIAN_H_
+
#include "place_base.h"
#include "place_qpsolver.h"
+ABC_NAMESPACE_HEADER_START
+
+
// Parameters for analytic placement
#define CLIQUE_PENALTY 1.0
#define IGNORE_NETSIZE 20
@@ -75,4 +79,8 @@ void sanitizePlacement();
void constructQuadraticProblem();
void solveQuadraticProblem(bool useCOG);
+
+
+ABC_NAMESPACE_HEADER_END
+
#endif
diff --git a/src/phys/place/place_inc.c b/src/phys/place/place_inc.c
index 7e2d847c..70eacbe9 100644
--- a/src/phys/place/place_inc.c
+++ b/src/phys/place/place_inc.c
@@ -15,6 +15,9 @@
#include "place_base.h"
#include "place_gordian.h"
+ABC_NAMESPACE_IMPL_START
+
+
inline int sqHashId(int id, int max) {
return ((id * (id+17)) % max);
}
@@ -104,3 +107,5 @@ float fastEstimate(ConcreteCell *cell,
return len;
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_io.c b/src/phys/place/place_io.c
index 8e24ef4a..16ad5339 100644
--- a/src/phys/place/place_io.c
+++ b/src/phys/place/place_io.c
@@ -15,6 +15,9 @@
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// writeBookshelfNodes()
@@ -92,3 +95,5 @@ void writeBookshelf(const char *filename) {
writeBookshelfNodes("out.nodes");
writeBookshelfPl("out.pl");
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_legalize.c b/src/phys/place/place_legalize.c
index 950902f4..4b1e28ea 100644
--- a/src/phys/place/place_legalize.c
+++ b/src/phys/place/place_legalize.c
@@ -12,6 +12,9 @@
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// legalize()
@@ -21,3 +24,5 @@ void legalize() {
// UNIMPLEMENTED
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_pads.c b/src/phys/place/place_pads.c
index 361fac7f..bf0922e7 100644
--- a/src/phys/place/place_pads.c
+++ b/src/phys/place/place_pads.c
@@ -14,6 +14,9 @@
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// globalPreplace()
//
@@ -139,3 +142,5 @@ void globalPreplace(float utilization) {
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_partition.c b/src/phys/place/place_partition.c
index ea57cd1c..eeef7037 100644
--- a/src/phys/place/place_partition.c
+++ b/src/phys/place/place_partition.c
@@ -21,6 +21,9 @@
#if !defined(NO_HMETIS)
#include "libhmetis.h"
+
+ABC_NAMESPACE_IMPL_START
+
#endif
// --------------------------------------------------------------------
@@ -1133,3 +1136,5 @@ void incrementalPartition() {
free(allCells);
free(newCells);
}
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_qpsolver.c b/src/phys/place/place_qpsolver.c
index 9df9c6dc..29e41bd4 100644
--- a/src/phys/place/place_qpsolver.c
+++ b/src/phys/place/place_qpsolver.c
@@ -14,6 +14,9 @@
#include "place_qpsolver.h"
+ABC_NAMESPACE_IMPL_START
+
+
#undef QPS_DEBUG
#define QPS_TOL 1.0e-3
@@ -1268,3 +1271,5 @@ qps_clean(qps_problem_t * p)
}
/**********************************************************************/
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/phys/place/place_qpsolver.h b/src/phys/place/place_qpsolver.h
index 08771d6b..f859a6ff 100644
--- a/src/phys/place/place_qpsolver.h
+++ b/src/phys/place/place_qpsolver.h
@@ -10,8 +10,12 @@
#if !defined(_QPS_H)
#define _QPS_H
+
#include <stdio.h>
+ABC_NAMESPACE_HEADER_START
+
+
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
@@ -137,4 +141,8 @@ extern "C" {
#if defined(__cplusplus)
}
#endif /* __cplusplus */
+
+
+ABC_NAMESPACE_HEADER_END
+
#endif /* _QPS_H */
diff --git a/src/phys/place/place_test.c b/src/phys/place/place_test.c
index ea706a09..93f762f8 100644
--- a/src/phys/place/place_test.c
+++ b/src/phys/place/place_test.c
@@ -13,6 +13,9 @@
#include <assert.h>
#include "place_base.h"
+ABC_NAMESPACE_IMPL_START
+
+
// --------------------------------------------------------------------
// Hash type/functions
@@ -358,3 +361,5 @@ int main(int argc, char **argv) {
return 0;
}
+ABC_NAMESPACE_IMPL_END
+