Skip to content

Commit

Permalink
Some small nitpicks from self-review.
Browse files Browse the repository at this point in the history
  • Loading branch information
joka921 committed Apr 12, 2020
1 parent ffb3e35 commit df85ad9
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/engine/IndexScan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// Author: Björn Buchhold (buchhold@informatik.uni-freiburg.de)

#include "./IndexScan.h"
#include <shared_mutex>
#include <sstream>
#include <string>

Expand Down
1 change: 0 additions & 1 deletion src/engine/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <algorithm>
#include <cstring>
#include <nlohmann/json.hpp>
#include <shared_mutex>
#include <sstream>
#include <string>
#include <thread>
Expand Down
4 changes: 2 additions & 2 deletions src/index/FTSAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void FTSAlgorithms::intersectKWay(const vector<vector<Id>>& cidVecs,
resEids.resize(minSize);
}

// For intersection, we don't need a HeapBasedPQ.
// For intersection, we don't need a PQ.
// The algorithm:
// Remember the current context and the length of the streak
// (i.e. in how many lists was that context found).
Expand All @@ -202,7 +202,7 @@ void FTSAlgorithms::intersectKWay(const vector<vector<Id>>& cidVecs,
// b) a higher context is found without a match before (reset cur and streak).
// Stop as soon as one list cannot advance.

// I think no HeapBasedPQ is needed, because unlike for merge, elements that
// I think no PQ is needed, because unlike for merge, elements that
// do not occur in all lists, don't have to be visited in the right order.

vector<size_t> nextIndices;
Expand Down
1 change: 0 additions & 1 deletion src/index/Index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "../util/BatchedPipeline.h"
#include "../util/Conversions.h"
#include "../util/HashMap.h"
#include "../util/PriorityQueue.h"
#include "../util/TupleHelpers.h"
#include "./Index.h"
#include "./PrefixHeuristic.h"
Expand Down
2 changes: 1 addition & 1 deletion test/IndexTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ TEST(IndexTest, scanTest) {

std::fstream f("_testtmp2.tsv", std::ios_base::out);

// Vocab::
// Vocab:
// 0: a
// 1: a2
// 2: b
Expand Down
13 changes: 9 additions & 4 deletions test/SynchronizedTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,11 @@ TEST(Synchronized, SFINAE) {
const Synchronized<Vec, std::shared_mutex>>::value);
static_assert(!AllowsNonConstSharedAccess<
const Synchronized<Vec, std::shared_mutex>>::value);
// static_assert(!AllowsNonConstExclusiveAccessLambda<const Synchronized<Vec,
// std::shared_mutex>>::value);

// Outcommenting this does not compile and cannot be brought to compile
// without making usage of the Synchronized classes "withWriteLock" method
// unecessarily hard. static_assert(!AllowsNonConstExclusiveAccessLambda<const
// Synchronized<Vec, std::shared_mutex>>::value);
static_assert(AllowsConstExclusiveAccessLambda<
const Synchronized<Vec, std::shared_mutex>>::value);
static_assert(AllowsConstSharedAccessLambda<
Expand All @@ -228,8 +231,10 @@ TEST(Synchronized, SFINAE) {
static_assert(
!AllowsNonConstSharedAccess<const Synchronized<Vec, std::mutex>>::value);

// static_assert(!AllowsNonConstExclusiveAccessLambda<const Synchronized<Vec,
// std::mutex>>::value);
// Outcommenting this does not compile and cannot be brought to compile
// without making usage of the Synchronized classes "withWriteLock" method
// unecessarily hard. static_assert(!AllowsNonConstExclusiveAccessLambda<const
// Synchronized<Vec, std::mutex>>::value);
static_assert(AllowsConstExclusiveAccessLambda<
const Synchronized<Vec, std::mutex>>::value);
static_assert(!AllowsConstSharedAccessLambda<
Expand Down

0 comments on commit df85ad9

Please sign in to comment.