mirror of https://github.com/openXC7/prjxray.git
Add "segmatch -k"
Signed-off-by: Clifford Wolf <clifford@clifford.at> Signed-off-by: Tim 'mithro' Ansell <mithro@mithis.com>
This commit is contained in:
parent
913c4104b2
commit
78a0ca0ef7
|
|
@ -19,6 +19,7 @@ DEFINE_bool(i, false, "add inverted tags");
|
|||
DEFINE_int32(m, 0, "min number of set/cleared samples each");
|
||||
DEFINE_int32(M, 0, "min number of set/cleared samples total");
|
||||
DEFINE_string(o, "", "set output file");
|
||||
DEFINE_string(k, "", "set output mask file");
|
||||
|
||||
using std::map;
|
||||
using std::tuple;
|
||||
|
|
@ -372,6 +373,14 @@ int main(int argc, char **argv)
|
|||
printf("avg #of candidates: %.3f\n", avg_candidates);
|
||||
}
|
||||
|
||||
if (!FLAGS_k.empty()) {
|
||||
f = fopen(FLAGS_k.c_str(), "w");
|
||||
assert(f != nullptr);
|
||||
std::sort(bit_ids_r.begin(), bit_ids_r.end());
|
||||
for (auto bit : bit_ids_r)
|
||||
fprintf(f, "bit %s\n", bit.c_str());
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue