-
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.
Merge pull request #80 from joka921/f.mmapBasedArray
Dense Meta Data using MMap-Based arrays.
- Loading branch information
Showing
26 changed files
with
2,334 additions
and
431 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
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.