-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Integrated madvise wrapper into MmapVector Added Tests for OSP scan + review -small changes from Niklas' review -Unit tests for readonly mode of MmapVector -e2e-test for OSP scan Added MmapVectorView and unit tests for it Todo: Comment MmapVectorView - Create MmapVectorView based MetaData type and integrate it into the Index class Integration of MmmapVectorView to IndexMetaData. Not yet finished waiting for C++17 Working version with MmapView and C++17
- Loading branch information
Showing
25 changed files
with
2,288 additions
and
390 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright 2018, University of Freiburg, | ||
// Chair of Algorithms and Data Structures. | ||
// Author: Johannes Kalmbach (johannes.kalmbach@gmail.com) | ||
// | ||
#include "./index/MetaDataConverter.h" | ||
#include <array> | ||
#include <iostream> | ||
#include "./global/Constants.h" | ||
#include "./util/File.h" | ||
|
||
// _________________________________________________________ | ||
int main (int argc, char** argv) { | ||
if (argc != 2) { | ||
std::cerr << "Usage: ./MetaDataConverterMain <indexPrefix>\n"; | ||
exit(1); | ||
} | ||
std::string in = argv[1]; | ||
std::array<std::string, 4> sparseNames{".pso", ".pos", ".spo", ".sop"}; | ||
for (const auto& n : sparseNames) { | ||
std::string permutName = in + ".index" + n; | ||
if (!ad_utility::File::exists(permutName)) { | ||
std::cerr << "Permutation file " << permutName | ||
<< " was not found. Maybe not all permutations were built for " | ||
"this index. Skipping\n"; | ||
continue; | ||
} | ||
addMagicNumberToSparseMetaDataPermutation(permutName, | ||
permutName + ".converted"); | ||
} | ||
|
||
std::array<std::string, 2> denseNames{".osp", ".ops"}; | ||
for (const auto& n : denseNames) { | ||
std::string permutName = in + ".index" + n; | ||
if (!ad_utility::File::exists(permutName)) { | ||
std::cerr << "Permutation file " << permutName | ||
<< " was not found. Maybe not all permutations were built for " | ||
"this index. Skipping\n"; | ||
continue; | ||
} | ||
convertHmapBasedPermutatationToMmap(permutName, permutName + ".converted", | ||
permutName + MMAP_FILE_SUFFIX); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.