Skip to content

Commit

Permalink
Move include files to not clutter global include namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteHamster committed Nov 21, 2024
1 parent a1cda8c commit 847254c
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion benchmark/bijections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "bijections/RecSplitRotate.h"
#include "bijections/ShockHash1.h"
#include "bijections/ShockHash1Rotate.h"
#include "ShockHash2-internal.h"
#include "shockhash/ShockHash2-internal.h"

template<size_t leafSize, class T>
void testSingle(size_t iterations) {
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bijections/ShockHash1.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <cmath>
#include <TinyBinaryCuckooHashTable.h>
#include "shockhash/TinyBinaryCuckooHashTable.h"

/**
* ShockHash base case
Expand Down
2 changes: 1 addition & 1 deletion benchmark/bijections/ShockHash1Rotate.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once

#include <cmath>
#include <TinyBinaryCuckooHashTable.h>
#include "shockhash/TinyBinaryCuckooHashTable.h"

/**
* ShockHash base case
Expand Down
2 changes: 1 addition & 1 deletion benchmark/golombMemoTuner.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <vector>
#include <iostream>
#include <bytehamster/util/XorShift64.h>
#include "ShockHash2-internal.h"
#include "shockhash/ShockHash2-internal.h"

template <template<size_t> class T, size_t leafSize>
void dispatchLeafSize() {
Expand Down
8 changes: 4 additions & 4 deletions benchmark/numHashEvals.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include <iostream>
#include <vector>
#include <cmath>
#include "../include/TinyBinaryCuckooHashTable.h"
#include "../include/UnionFind.h"
#include "shockhash/TinyBinaryCuckooHashTable.h"
#include "shockhash/UnionFind.h"
#include <bytehamster/util/XorShift64.h>
#include <chrono>
#include <set>
#include <unordered_set>
#include <ShockHash2-precompiled.h>
#include <PairingFunction.h>
#include "shockhash/ShockHash2-precompiled.h"
#include "shockhash/PairingFunction.h"

static constexpr uint64_t rotate(size_t l, uint64_t val, uint32_t x) {
return ((val << x) | (val >> (l - x))) & ((1ul << l) - 1);
Expand Down
4 changes: 2 additions & 2 deletions include/SIMDShockHash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
* For tiny space usages (~1.6 bit/object), ShockHash is faster than RecSplit.
*/

#include <ShockHash.h>
#include <sux/util/Vector.hpp>
#include <sux/function/DoubleEF.hpp>
#include <sux/function/RiceBitVector.hpp>
#include "SimdUtils.h"
#include <array>
#include <cassert>
#include <chrono>
Expand All @@ -19,6 +17,8 @@
#include <fstream>
#include <utility>
#include <span>
#include "ShockHash.h"
#include "shockhash/SimdUtils.h"

#ifndef SIMD
#error Need to compile SIMDShockHash with -DSIMD
Expand Down
6 changes: 3 additions & 3 deletions include/ShockHash.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <sux/function/RiceBitVector.hpp>
#include <sux/function/RecSplit.hpp>
#include <SimpleRibbon.h>
#include <Sorter.hpp>
#include "TinyBinaryCuckooHashTable.h"
#include "RiceBitVector.h"
#include "shockhash/Sorter.hpp"
#include "shockhash/TinyBinaryCuckooHashTable.h"
#include "shockhash/RiceBitVector.h"

namespace shockhash {
using namespace sux;
Expand Down
6 changes: 3 additions & 3 deletions include/ShockHash2.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
#include <sux/function/RiceBitVector.hpp>
#include <sux/function/RecSplit.hpp>
#include <SimpleRibbon.h>
#include <Sorter.hpp>
#include "shockhash/Sorter.hpp"
#include "ShockHash.h"
#include "ShockHash2-precompiled.h"
#include "RiceBitVector.h"
#include "shockhash/ShockHash2-precompiled.h"
#include "shockhash/RiceBitVector.h"

namespace shockhash {
static const int MAX_LEAF_SIZE2 = 128;
Expand Down
6 changes: 3 additions & 3 deletions include/ShockHash2Flat.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#include <bytehamster/util/EliasFano.h>
#include <bytehamster/util/MurmurHash64.h>
#include <tlx/math/integer_log2.hpp>
#include <ShockHash2-internal.h>
#include <ShockHash2.h>
#include <sdsl/int_vector.hpp>
#include "ShockHash2FlatBase.h"
#include "ShockHash2.h"
#include "shockhash/ShockHash2-internal.h"
#include "shockhash/ShockHash2FlatBase.h"

namespace shockhash {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <unordered_map>
#include <iostream>
#include <algorithm>
#include <TinyBinaryCuckooHashTable.h>
#include <UnionFind.h>
#include "TinyBinaryCuckooHashTable.h"
#include "UnionFind.h"
#include <experimental/simd>
#include "PairingFunction.h"
#include "CuckooUnionFind.h"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/ShockHash2-precompiled.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "ShockHash2-precompiled.h"
#include "ShockHash2-internal.h"
#include "shockhash/ShockHash2-precompiled.h"
#include "shockhash/ShockHash2-internal.h"

namespace shockhash {

Expand Down
4 changes: 2 additions & 2 deletions src/Sorter.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include <Sorter.hpp>
#include <ips2ra.hpp>
#include <sux/function/RecSplit.hpp>
#include "ShockHash2FlatBase.h"
#include "shockhash/Sorter.hpp"
#include "shockhash/ShockHash2FlatBase.h"

void shockhash::sort_hash128_t(sux::function::hash128_t *objects, size_t n, size_t threads) {
ips2ra::parallel::sort(objects, objects + n, [&](const sux::function::hash128_t &a) { return a.first; }, threads);
Expand Down

0 comments on commit 847254c

Please sign in to comment.