Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kučera Petr RNDr. Ph.D.
PCCompile
Commits
795a88f2
Commit
795a88f2
authored
Jul 14, 2021
by
Kučera Petr RNDr. Ph.D.
Browse files
Removed EnumClassHash
parent
3e3f713b
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/dpelim.cpp
View file @
795a88f2
...
...
@@ -12,6 +12,7 @@
#include <iostream>
#include "encoding.h"
#include "enum_opt.h"
#include "logstream.h"
#include "prgutil.h"
...
...
@@ -34,10 +35,14 @@ enum class ELIMINATE
Last
=
FACTOR
};
const
std
::
unordered_map
<
ELIMINATE
,
std
::
string
,
SUBool
::
EnumClassHash
>
eliminate_names
=
{{
ELIMINATE
::
ALL
,
"all"
},
{
ELIMINATE
::
MAX_INCREASE
,
"max_increase"
},
{
ELIMINATE
::
FACTOR
,
"factor"
}};
const
SUBool
::
EnumAnnotation
<
ELIMINATE
>
kEliminateAnnotation
(
"ELIMINATE"
,
{{
ELIMINATE
::
ALL
,
"all"
,
"Eliminate all auxiliary variables."
},
{
ELIMINATE
::
MAX_INCREASE
,
"max_increase"
,
"Elimination limited with the absolute increase of "
"the size of the CNF."
},
{
ELIMINATE
::
FACTOR
,
"factor"
,
"Elimination limited with the factor by which the "
"size of the CNF can increase."
}});
const
std
::
array
<
std
::
string
,
static_cast
<
size_t
>
(
SUBool
::
DPEliminator
::
IGNORE_POLICY
::
Last
)
+
1
>
...
...
@@ -95,8 +100,8 @@ dump_config(const config_t &conf, unsigned level)
"
\t
"
,
level
,
"elim.use_minimize"
,
conf
.
elim
.
use_minimize
);
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"elim.block_prime"
,
block_prime_names
.
at
(
static_cast
<
unsigned
>
(
conf
.
elim
.
block_prime
)));
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"elim.eliminate"
,
eliminate_names
.
at
(
conf
.
elim
.
eliminate
)
)
;
kEliminateAnnotation
.
DumpValue
(
"
\t
"
,
level
,
"elim.eliminate"
,
conf
.
elim
.
eliminate
);
SUBool
::
logs
.
DumpValue
(
"
\t
"
,
level
,
"elim.ignore_policy"
,
elim_ignore_policy_names
.
at
(
static_cast
<
unsigned
>
(
conf
.
elim
.
ignore_policy
)));
...
...
lib/enum.h
View file @
795a88f2
...
...
@@ -40,16 +40,6 @@ namespace SUBool
return
enum_of_int
<
E
>
(
i
-
names
.
begin
());
}
struct
EnumClassHash
{
template
<
class
T
>
size_t
operator
()(
T
t
)
const
{
return
static_cast
<
size_t
>
(
t
);
}
};
template
<
class
Enum
,
class
Names
>
[[
deprecated
(
"Use EnumAnnotation"
)]]
void
dump_enum_value
(
const
std
::
string
&
line_prefix
,
unsigned
level
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment