2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 91c4bed8 authored by Matthias Rungger's avatar Matthias Rungger
Browse files

Maximal number of variables corrected in CuddMintermIterator.hh

parent c5eb124b
......@@ -59,7 +59,7 @@ class CuddMintermIterator {
done_=false;
counter_=0;
if(nvars_>(sizeof(size_t))) {
if(nvars_>sizeof(size_t)*8) {
std::ostringstream os;
os << "Error: CuddMintermIterator: number of variables we iterate over is limited to highest number in size_t.";
throw std::invalid_argument(os.str().c_str());
......@@ -133,7 +133,7 @@ class CuddMintermIterator {
std::cout<<std::endl;
/* number of variables we iterate over is limited to highest number in size_t */
if(nvars_>(sizeof(size_t))) {
if(nvars_>sizeof(size_t)*8) {
std::ostringstream os;
os << "Error: CuddMintermIterator: number of variables we iterate over is limited to highest number in size_t.";
throw std::invalid_argument(os.str().c_str());
......@@ -182,14 +182,13 @@ class CuddMintermIterator {
}
inline void operator++(void) {
const size_t MVAR = sizeof(size_t);
iterator++;
progress++;
/* get new cube or expand cube further */
if (iterator<nexpand) {
/* still not don with this cube */
/* generate binary value for iterator to fill cube */
std::bitset<MVAR> iterator2binary(iterator);
std::bitset<sizeof(size_t)*8> iterator2binary(iterator);
for(size_t i=0; i<ndontcares; i++)
cube[idontcares[i]]=iterator2binary[i];
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment