Skip to content

Commit

Permalink
removing tools/debug.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bingmann committed May 4, 2017
1 parent 025fe04 commit 4179bcc
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 79 deletions.
1 change: 0 additions & 1 deletion src/parallel/bingmann-parallel_mkqs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include <iostream>
#include <vector>

#include "../tools/debug.hpp"
#include "../tools/contest.hpp"
#include "../tools/stringtools.hpp"
#include "../tools/jobqueue.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/parallel/bingmann-parallel_sample_sort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include <vector>
#include <algorithm>

#include "../tools/debug.hpp"

#include "../tools/lcgrandom.hpp"
#include "../tools/contest.hpp"
#include "../tools/stringtools.hpp"
Expand Down
2 changes: 0 additions & 2 deletions src/parallel/eberle-parallel-lcp-merge-binary-splitting.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

#include "eberle-parallel-lcp-merge.hpp"

#include "../tools/debug.hpp"

namespace eberle_parallel_lcp_merge {

// debugging constants
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "eberle-parallel-lcp-merge.hpp"

#include "../sequential/bs-mkqs.hpp"
#include "../tools/debug.hpp"

namespace eberle_parallel_lcp_merge {

Expand Down
2 changes: 0 additions & 2 deletions src/parallel/eberle-parallel-lcp-merge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
#include "../tools/jobqueue.hpp"
#include "../tools/stringtools.hpp"

#include "../tools/debug.hpp"

#include <tlx/logger.hpp>

namespace eberle_parallel_lcp_merge {
Expand Down
1 change: 0 additions & 1 deletion src/psstest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ std::vector<size_t> g_numa_string_count; // pointer to strings on NUMA node

// *** Tools and Algorithms

#include "tools/debug.hpp"
#include "tools/membuffer.hpp"
#include "tools/lcgrandom.hpp"
#include "tools/contest.hpp"
Expand Down
2 changes: 1 addition & 1 deletion src/sequential/bingmann-lcp_inssort.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ void lcp_insertion_sort_pseudocode(
lcp[i + 1] = h;
}

std::cout << "lcp_inssort comparisons = " << cmp << "\n";
LOG1 << "lcp_inssort comparisons = " << cmp;
}

//! LCP insertion sort, but immediately discard the lcp
Expand Down
1 change: 0 additions & 1 deletion src/sequential/bingmann-stdsort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <cstdlib>
#include <algorithm>

#include "../tools/debug.hpp"
#include "../tools/contest.hpp"
#include "../tools/stringtools.hpp"

Expand Down
49 changes: 0 additions & 49 deletions src/tools/debug.hpp

This file was deleted.

20 changes: 9 additions & 11 deletions src/tools/stringptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@

#include <cassert>
#include <stdint.h>
#include "debug.hpp"
#include <numa.h>
#include "stringset.hpp"

Expand Down Expand Up @@ -965,16 +964,15 @@ verify_lcp_cache(
{
if (lcps[0] != expectedFirstLcp)
{
std::cout << "lcp[0] = " << lcps[0]
<< " excepted " << expectedFirstLcp << std::endl;
LOG1 << "lcp[0] = " << lcps[0]
<< " excepted " << expectedFirstLcp;
allValid = false;
}
if (checkCache && expectedFirstLcp != 42 &&
*cache != ss.get_char(ss[begin], lcps[0]))
{
std::cout << "cache[0] = " << cache[0]
<< " excepted " << ss.get_char(ss[begin], lcps[0])
<< std::endl;
LOG1 << "cache[0] = " << cache[0]
<< " excepted " << ss.get_char(ss[begin], lcps[0]);
allValid = false;
}
}
Expand All @@ -988,20 +986,20 @@ verify_lcp_cache(

if (h != lcps[i])
{
std::cout << "lcp[" << i << "] = " << lcps[i]
<< " excepted " << h << std::endl;
LOG1 << "lcp[" << i << "] = " << lcps[i]
<< " excepted " << h;
allValid = false;
}
if (checkCache && cache[i] != ss.get_char(s2, lcps[i]))
{
std::cout << "cache[" << i << "] = " << cache[i]
<< " excepted " << ss.get_char(s2, lcps[i]) << std::endl;
LOG1 << "cache[" << i << "] = " << cache[i]
<< " excepted " << ss.get_char(s2, lcps[i]);
allValid = false;
}
}

if (!allValid)
std::cout << "Found invalid LCPS and/or cache values!" << std::endl;
LOG1 << "Found invalid LCPS and/or cache values!";

return allValid;
}
Expand Down
6 changes: 3 additions & 3 deletions src/tools/stringset.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#include <vector>
#include <memory>

#include "debug.hpp"
#include <tlx/logger.hpp>

namespace parallel_string_sorting {

Expand Down Expand Up @@ -277,8 +277,8 @@ class StringSetBase
size_t i = 0;
for (typename Traits::Iterator pi = ss.begin(); pi != ss.end(); ++pi)
{
std::cout << "[" << i++ << "] = " << ss[pi]
<< " = " << ss.get_string(ss[pi], 0) << std::endl;
LOG1 << "[" << i++ << "] = " << ss[pi]
<< " = " << ss.get_string(ss[pi], 0);

// for printing std::unique_ptr<std::string>
// std::cout << "[" << i++ << "] = " << ss[pi].get();
Expand Down
9 changes: 4 additions & 5 deletions src/tools/stringtools.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#define PSS_SRC_TOOLS_STRINGTOOLS_HEADER

#include <cassert>
#include "debug.hpp"
#include <tlx/logger.hpp>

namespace stringtools {
Expand Down Expand Up @@ -400,15 +399,15 @@ struct TreeCalculations
{
for (size_t i = 1; i <= numnodes; ++i)
{
std::cout << toBinary(i, treebits) << " -> " << std::endl;
LOG1 << toBinary(i, treebits) << " -> ";

size_t id = level_to_preorder(i);
std::cout << toBinary(id, treebits) << " -> " << std::endl;
LOG1 << toBinary(id, treebits) << " -> ";

id = pre_to_levelorder(id);
std::cout << toBinary(id, treebits) << std::endl;
LOG1 << toBinary(id, treebits);

std::cout << std::endl;
LOG1 << "";
assert(id == i);
}
}
Expand Down

0 comments on commit 4179bcc

Please sign in to comment.