Implement MPHF migration tool and sparse matrix permutation logic
Refactors sparse matrix handling to implement row permutation logic and introduces a standalone tool for migrating indexes from MPHF 1.x to 2.x formats.
This commit is contained in:
1 parent
d686d39506
commit
8b87078478
24 files changed
+3982
-19
No files matched your search
@@ -0,0 +1,17 @@
|
||||
//! The previous MPHF generation (`ptr_hash` 1.x), kept only to read the
|
||||
//! `mphf.bin` files of indexes built before the migration.
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use anyhow::{Result, anyhow};
|
||||
use cacheline_ef_old::{CachelineEf, CachelineEfVec};
|
||||
use epserde_old::prelude::*;
|
||||
use ptr_hash_old::{PtrHash, bucket_fn::CubicEps, hash::Xx64};
|
||||
|
||||
/// Exactly the type `obikindex` used before the migration.
|
||||
pub type OldMphf = PtrHash<u64, CubicEps, CachelineEfVec<Vec<CachelineEf>>, Xx64, Vec<u8>>;
|
||||
|
||||
pub fn load(path: &Path) -> Result<OldMphf> {
|
||||
OldMphf::load_full(path)
|
||||
.map_err(|e| anyhow!("{}: not a ptr_hash 1.x MPHF (already converted?): {e}", path.display()))
|
||||
}
|
||||
Reference in new issue
Block a user