Skip to content

Commit

Permalink
Merge pull request #138 from niklas88/bingmann-stxxl-update
Browse files Browse the repository at this point in the history
Bingmann stxxl update
  • Loading branch information
niklas88 committed Oct 10, 2018
2 parents 8eb1d30 + 0cdaddb commit 0c36c60
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "third_party/stxxl"]
path = third_party/stxxl
url = https://github.com/stxxl/stxxl.git
url = https://github.com/bingmann/stxxl
[submodule "third_party/googletest"]
path = third_party/googletest
url = https://github.com/google/googletest.git
Expand Down
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ set(USE_OPENMP OFF CACHE BOOL "Don't use OpenMP" FORCE)
add_subdirectory(third_party/stxxl)
# apply STXXL CXXFLAGS
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${STXXL_CXX_FLAGS}")
# add STXXL includes path
include_directories(SYSTEM ${STXXL_INCLUDE_DIRS})

message(STATUS ---)
message(STATUS "CXX_FLAGS are : " ${CMAKE_CXX_FLAGS})
Expand Down
2 changes: 1 addition & 1 deletion src/index/Index.Text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ void Index::buildDocsDB(const string& docsFileName) {
std::ofstream ofs(_onDiskBase + ".text.docsDB", std::ios_base::out);
// To avoid excessive use of RAM,
// we write the offsets to and stxxl:vector first;
typedef stxxl::VECTOR_GENERATOR<off_t>::result OffVec;
typedef stxxl::vector<off_t> OffVec;
OffVec offsets;
off_t currentOffset = 0;
Id currentContextId = 0;
Expand Down
3 changes: 2 additions & 1 deletion src/index/Index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@
// Chair of Algorithms and Data Structures.
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)

#include "./Index.h"
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <optional>
#include <stxxl/algorithm>
#include <stxxl/map>
#include <unordered_set>

#include "../parser/NTriplesParser.h"
#include "../parser/TsvParser.h"
#include "../util/Conversions.h"
#include "../util/HashMap.h"
#include "./Index.h"
#include "./PrefixHeuristic.h"
#include "./VocabularyGenerator.h"

Expand Down
5 changes: 2 additions & 3 deletions src/index/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,9 @@ struct LinesAndWords {

class Index {
public:
typedef stxxl::VECTOR_GENERATOR<array<Id, 3>>::result ExtVec;
typedef stxxl::vector<array<Id, 3>> ExtVec;
// Block Id, Context Id, Word Id, Score, entity
typedef stxxl::VECTOR_GENERATOR<tuple<Id, Id, Id, Score, bool>>::result
TextVec;
typedef stxxl::vector<tuple<Id, Id, Id, Score, bool>> TextVec;
typedef std::tuple<Id, Id, Score> Posting;

// Forbid copy and assignment
Expand Down
22 changes: 0 additions & 22 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,25 +66,3 @@ target_link_libraries(HasPredicateScanTest gtest_main engine ${CMAKE_THREAD_LIBS

add_executable(MmapVectorTest MmapVectorTest.cpp)
target_link_libraries(MmapVectorTest gtest_main -pthread)

add_library(tests
SparqlParserTest
StringUtilsTest
LRUCacheTest
Simple8bTest
FileTest
VocabularyTest
TsvParserTest
ContextFileParserTest
IndexMetaDataTest
IndexTest
EngineTest
FTSAlgorithmsTest
QueryPlannerTest
ConversionsTest
SparsehashTest
GroupByTest
VocabularyGeneratorTest
HasPredicateScanTest
MmapVectorTest
)
2 changes: 1 addition & 1 deletion third_party/stxxl
Submodule stxxl updated 439 files

0 comments on commit 0c36c60

Please sign in to comment.