Skip to content

Wrap cityhash in namespace and add accessor methods for metagraph com… - #15

Merged
adamant-pwn merged 1 commit into
masterfrom
merge-upstream-master-with-metagraph-compatibility
Feb 16, 2026
Merged

Wrap cityhash in namespace and add accessor methods for metagraph com…#15
adamant-pwn merged 1 commit into
masterfrom
merge-upstream-master-with-metagraph-compatibility

Conversation

@adamant-pwn

Copy link
Copy Markdown
Member

…patibility

Changes for metagraph integration:

  1. Wrap cityhash in namespace to avoid typedef pollution

    • cityhash.hpp and cityhash.cpp: Wrapped in 'cityhash' namespace
    • Prevents conflicts with rollinghashcpp uint64 typedef
    • hash_util.hpp: Use cityhash::CityHash128WithSeed instead of static CityMurmur
    • tools/query.cpp: Changed uint64 to uint64_t (standard type)
  2. Add public accessor methods to dictionary

    • Added kmer_type typedef for easier template parameter extraction
    • Added strings() accessor returning m_spss.strings bit vector
    • Added strings_offsets() accessor returning m_spss.strings_offsets
    • Moved strings_offsets() next to string_offsets() for better organization
  3. Build system changes

    • CMakeLists.txt: Added cityhash.cpp to SSHASH_SOURCES
    • CMakeLists.txt: Link sshash executable against sshash_static (includes cityhash)
  4. Update pthash submodule

    • Now tracking ratschlab/pthash master with compute_empirical_entropy fix
    • .gitmodules: Updated URL to point to ratschlab/pthash

…patibility

Changes for metagraph integration:

1. Wrap cityhash in namespace to avoid typedef pollution
   - cityhash.hpp and cityhash.cpp: Wrapped in 'cityhash' namespace
   - Prevents conflicts with rollinghashcpp uint64 typedef
   - hash_util.hpp: Use cityhash::CityHash128WithSeed instead of static CityMurmur
   - tools/query.cpp: Changed uint64 to uint64_t (standard type)

2. Add public accessor methods to dictionary
   - Added kmer_type typedef for easier template parameter extraction
   - Added strings() accessor returning m_spss.strings bit vector
   - Added strings_offsets() accessor returning m_spss.strings_offsets
   - Moved strings_offsets() next to string_offsets() for better organization

3. Build system changes
   - CMakeLists.txt: Added cityhash.cpp to SSHASH_SOURCES
   - CMakeLists.txt: Link sshash executable against sshash_static (includes cityhash)

4. Update pthash submodule
   - Now tracking ratschlab/pthash master with compute_empirical_entropy fix
   - .gitmodules: Updated URL to point to ratschlab/pthash
@adamant-pwn
adamant-pwn merged commit 6a0b6fb into master Feb 16, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant