From a53589956ef861b03706ded44a9e49f40af69679 Mon Sep 17 00:00:00 2001 From: Rick Altherr Date: Thu, 14 Dec 2017 11:36:01 -0800 Subject: [PATCH] Revert "segmatch: add options to exclude tags and bits from a database" Does not work as intended. Removing to avoid confusion. This reverts commit caeba1b49af17bdceb35803b2c3bc55ef0e3cf62. Signed-off-by: Rick Altherr Signed-off-by: Tim 'mithro' Ansell --- tools/CMakeLists.txt | 2 +- tools/segmatch.cc | 31 ------------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 68290a6c..652d73e2 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -2,7 +2,7 @@ add_executable(bitread bitread.cc) target_link_libraries(bitread gflags absl::strings) add_executable(segmatch segmatch.cc) -target_link_libraries(segmatch libprjxray gflags absl::strings) +target_link_libraries(segmatch gflags absl::strings) add_executable(bittool bittool.cc) target_link_libraries(bittool libprjxray gflags absl::strings absl::span) diff --git a/tools/segmatch.cc b/tools/segmatch.cc index af379fda..1593e483 100644 --- a/tools/segmatch.cc +++ b/tools/segmatch.cc @@ -13,7 +13,6 @@ #include #include -#include DEFINE_int32(c, 4, "threshold under which candidates are output. set to -1 to output all."); DEFINE_bool(i, false, "add inverted tags"); @@ -21,9 +20,6 @@ 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"); -DEFINE_string(database_path, "", "path to root directory of a database"); -DEFINE_bool(exclude_known, false, "exclude tags and bits recorded in the " - "database specified by --database"); using std::map; using std::tuple; @@ -142,9 +138,6 @@ static inline bool_vec &segdata_bits(segdata_t &sd) { return std::get<0>(sd); } static inline bool_vec &segdata_tags1(segdata_t &sd) { return std::get<1>(sd); } static inline bool_vec &segdata_tags0(segdata_t &sd) { return std::get<2>(sd); } -std::set exclude_tags; -std::set exclude_bits; - void read_input(std::istream &f, std::string filename) { string token; @@ -174,10 +167,6 @@ void read_input(std::istream &f, std::string filename) assert(segptr != nullptr); f >> token; - - if (exclude_bits.find(token) == exclude_bits.end()) - continue; - if (bit_ids.count(token) == 0) { bit_ids[token] = num_bits++; bit_ids_r.push_back(token); @@ -195,13 +184,6 @@ void read_input(std::istream &f, std::string filename) assert(segptr != nullptr); f >> token; - - if (exclude_tags.find(token) == exclude_tags.end()) { - // Consume the rest of the line. - f >> token; - continue; - } - if (tag_ids.count(token) == 0) { tag_ids[token] = num_tags++; tag_ids_r.push_back(token); @@ -254,19 +236,6 @@ int main(int argc, char **argv) absl::StrCat("Usage: ", argv[0], " [options] file..")); gflags::ParseCommandLineFlags(&argc, &argv, true); - if (!FLAGS_database_path.empty()) { - prjxray::Database database(FLAGS_database_path); - - if (FLAGS_exclude_known) { - for (auto& segbits : database.segbits()) { - for (auto tag_bit : *segbits) { - exclude_tags.emplace(tag_bit.tag()); - exclude_bits.emplace(tag_bit.bit()); - } - } - } - } - if (argc > 1) { for (int optind = 1; optind < argc; optind++) { printf("Reading %s.\n", argv[optind]);