From efa278e232d20ea080743801bd91d55ec62955cf Mon Sep 17 00:00:00 2001 From: whitequark Date: Fri, 7 Dec 2018 19:14:07 +0000 Subject: Fix typographical and grammatical errors and inconsistencies. The initial list of hits was generated with the codespell command below, and each hit was evaluated and fixed manually while taking context into consideration. DIRS="kernel/ frontends/ backends/ passes/ techlibs/" DIRS="${DIRS} libs/ezsat/ libs/subcircuit" codespell $DIRS -S *.o -L upto,iff,thru,synopsys,uint More hits were found by looking through comments and strings manually. --- libs/ezsat/ezminisat.h | 2 +- libs/subcircuit/README | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'libs') diff --git a/libs/ezsat/ezminisat.h b/libs/ezsat/ezminisat.h index 983e6fd0e..3a34c13c8 100644 --- a/libs/ezsat/ezminisat.h +++ b/libs/ezsat/ezminisat.h @@ -28,7 +28,7 @@ #include // minisat is using limit macros and format macros in their headers that -// can be the source of some troubles when used from c++11. thefore we +// can be the source of some troubles when used from c++11. therefore we // don't force ezSAT users to use minisat headers.. namespace Minisat { class Solver; diff --git a/libs/subcircuit/README b/libs/subcircuit/README index b1335681e..ecaa987db 100644 --- a/libs/subcircuit/README +++ b/libs/subcircuit/README @@ -109,7 +109,7 @@ look at the demo.cc example program in this directory. Setting up graphs ----------------- -Instanciate the SubCircuit::Graph class and use the methods of this class to +Instantiate the SubCircuit::Graph class and use the methods of this class to set up the circuit. SubCircuit::Graph myGraph; @@ -152,7 +152,7 @@ rotate shift, The method createConstant() can be used to add a constant driver to a signal. The signal value is encoded as one char by bit, allowing for multi-valued -logic matching. The follwoing command sets the lowest bit of cell6.A to a +logic matching. The following command sets the lowest bit of cell6.A to a logic 1: myGraph.createConnection("cell6", "A", 0, '1'); @@ -314,7 +314,7 @@ bool userCompareEdge(needleGraphId, needleFromNodeId, needleFromUserData, needle Perform additional checks on a pair of a pair of adjacent nodes (one adjacent pair from the needle and one adjacent pair from the haystack) - to determine wheter this edge from the needle is compatible with + to determine whether this edge from the needle is compatible with that edge from the haystack. The default implementation always returns true. -- cgit v1.2.3 From 30c762d3a148afa9e27a93c1fa098b7c478511a4 Mon Sep 17 00:00:00 2001 From: Kristoffer Ellersgaard Koch Date: Sun, 5 May 2019 10:00:27 +0200 Subject: Fix all warnings that occurred when compiling with gcc9 --- libs/minisat/Vec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'libs') diff --git a/libs/minisat/Vec.h b/libs/minisat/Vec.h index 6e398801f..6856bfc57 100644 --- a/libs/minisat/Vec.h +++ b/libs/minisat/Vec.h @@ -94,6 +94,7 @@ public: }; + template void vec::capacity(Size min_cap) { if (cap >= min_cap) return; -- cgit v1.2.3 From caad497839d0d3aa91b02ce970968ad4e2c1ad88 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Wed, 8 May 2019 11:26:58 +0200 Subject: Remove added newline (by re-running minisat 00_UPDATE.sh) Signed-off-by: Clifford Wolf --- libs/minisat/Vec.h | 1 - 1 file changed, 1 deletion(-) (limited to 'libs') diff --git a/libs/minisat/Vec.h b/libs/minisat/Vec.h index 6856bfc57..6e398801f 100644 --- a/libs/minisat/Vec.h +++ b/libs/minisat/Vec.h @@ -94,7 +94,6 @@ public: }; - template void vec::capacity(Size min_cap) { if (cap >= min_cap) return; -- cgit v1.2.3 From f0ff31ceea6101cd59ebc6bdff2f253dbbeb06d8 Mon Sep 17 00:00:00 2001 From: Matthew Daiter Date: Wed, 22 May 2019 17:14:13 -0400 Subject: Optimize numberOfPermutations --- libs/subcircuit/subcircuit.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'libs') diff --git a/libs/subcircuit/subcircuit.cc b/libs/subcircuit/subcircuit.cc index 7c7236833..e8361a67e 100644 --- a/libs/subcircuit/subcircuit.cc +++ b/libs/subcircuit/subcircuit.cc @@ -320,12 +320,10 @@ class SubCircuit::SolverWorker static int numberOfPermutations(const std::vector &list) { - int numPermutations = 1; - for (int i = 0; i < int(list.size()); i++) { - assert(numPermutations < maxPermutationsLimit); - numPermutations *= i+1; - } - return numPermutations; + constexpr size_t mappedPermutationsSize = 10; + constexpr int mappedPermutations[mappedPermutationsSize] = {1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880}; + assert(list.size() < mappedPermutationsSize); + return mappedPermutations[list.size()]; } static void permutateVectorToMap(std::map &map, const std::vector &list, int idx) -- cgit v1.2.3