Skip to content

Commit

Permalink
Revert "[Features] integrating skiplist (#37)" (#39)
Browse files Browse the repository at this point in the history
This reverts commit 781c4eb.
  • Loading branch information
JslYoon authored Oct 4, 2024
1 parent 781c4eb commit 6b1cf48
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 105 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ add_library(bliss OBJECT
${CMAKE_SOURCE_DIR}/src/bliss/bench_lipp.h
${CMAKE_SOURCE_DIR}/src/bliss/bench_alex.h
${CMAKE_SOURCE_DIR}/src/bliss/bench_btree.h
${CMAKE_SOURCE_DIR}/src/bliss/bench_skiplist.h
)

target_compile_features(bliss PUBLIC
Expand All @@ -64,7 +63,6 @@ target_link_libraries(bliss PUBLIC
alex
lipp
tlx
skiplist
)

target_include_directories(bliss PUBLIC
Expand Down
18 changes: 2 additions & 16 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FetchContent_MakeAvailable(cxxopts)

FetchContent_Declare(
alex
GIT_REPOSITORY https://github.com/microsoft/ALEX
GIT_REPOSITORY https://github.com/microsoft/ALEX.git
GIT_TAG master
)
FetchContent_GetProperties(alex)
Expand Down Expand Up @@ -70,18 +70,4 @@ if (NOT tlx_POPULATED)
endif()

add_library(tlx INTERFACE)
target_include_directories(tlx INTERFACE ${tlx_SOURCE_DIR}/)


FetchContent_Declare(
skiplist
GIT_REPOSITORY https://github.com/Samyak2/skip-list.git
GIT_TAG main
)
FetchContent_GetProperties(skiplist)
if (NOT skiplist_POPULATED)
FetchContent_Populate(skiplist)
endif()

add_library(skiplist INTERFACE)
target_include_directories(skiplist INTERFACE ${skiplist_SOURCE_DIR}/skiplist)
target_include_directories(tlx INTERFACE ${tlx_SOURCE_DIR}/)
33 changes: 0 additions & 33 deletions src/bliss/bench_skiplist.h

This file was deleted.

4 changes: 0 additions & 4 deletions src/bliss_bench.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include <alex.h>
#include <lipp.h>
#include "skiplist_map.hpp"
#include <spdlog/common.h>

#include <cxxopts.hpp>
Expand All @@ -10,7 +9,6 @@
#include "bliss/bench_alex.h"
#include "bliss/bench_btree.h"
#include "bliss/bench_lipp.h"
#include "bliss/bench_skiplist.h"
#include "bliss/bliss_index.h"
#include "bliss/util/args.h"
#include "bliss/util/config.h"
Expand Down Expand Up @@ -170,8 +168,6 @@ int main(int argc, char *argv[]) {
index.reset(new bliss::BlissLippIndex<key_type, value_type>());
} else if (config.index == "btree") {
index.reset(new bliss::BlissBTreeIndex<key_type, value_type>());
} else if (config.index == "skiplist") {
index.reset(new bliss::BlissSkipListIndex<key_type, value_type>());
} else {
spdlog::error(config.index + " not implemented yet", 1);
}
Expand Down
3 changes: 1 addition & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ target_include_directories(bliss_test_infra PUBLIC

add_subdirectory(test_alex)
add_subdirectory(test_lipp)
add_subdirectory(test_btree)
add_subdirectory(test_skiplist)
add_subdirectory(test_btree)
9 changes: 2 additions & 7 deletions tests/bliss_index_tests.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@
#include <cxxopts.hpp>
#include <iostream>
#include <string>
#include <algorithm>
#include <random>

#include "bliss/bench_alex.h"
#include "bliss/bench_btree.h"
#include "bliss/bench_lipp.h"
#include "bliss/bench_skiplist.h"
#include "bliss/bliss_index.h"
#include "bliss/util/args.h"
#include "bliss/util/config.h"
Expand All @@ -30,7 +27,7 @@ using value_type = unsigned long;
class BlissIndexTest : public testing::Test {
protected:
std::unique_ptr<bliss::BlissIndex<key_type, value_type>> index;
std::string indexes[4] = {"alex", "lipp", "btree", "skiplist"};
std::string indexes[3] = {"alex", "lipp", "btree"};
int num_keys = 100000;

void SetUp() {}
Expand All @@ -41,9 +38,7 @@ class BlissIndexTest : public testing::Test {
data.push_back(i);
}
if (!sorted) {
std::random_device rd;
std::mt19937 g(rd());
std::shuffle(data.begin(), data.end(), g);
std::random_shuffle(data.begin(), data.end());
}
}
};
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lipp/lipp_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ TEST_F(LippTest, TestLipp_Sorted) {
}

TEST_F(LippTest, TestLipp_Random) {
index.reset(new bliss::BlissLippIndex<key_type, key_type>());
index.reset(new bliss::BlissAlexIndex<key_type, key_type>());
std::vector<key_type> data;
GenerateData(data, num_keys, false);

Expand Down
9 changes: 0 additions & 9 deletions tests/test_skiplist/CMakeLists.txt

This file was deleted.

31 changes: 0 additions & 31 deletions tests/test_skiplist/skiplist_tests.cpp

This file was deleted.

0 comments on commit 6b1cf48

Please sign in to comment.