Skip to content

Commit

Permalink
Merge pull request #878 from vsbogd/fix-i686-compatibility
Browse files Browse the repository at this point in the history
Use 30 bit ids for atom storage on a 32bit platform
  • Loading branch information
vsbogd authored Mar 6, 2025
2 parents 4df7da6 + 0a7f84f commit 1017274
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions lib/src/space/grounding/index/trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -485,14 +485,16 @@ enum AtomMatchMode {
Unification,
}

const TK_STORE_MASK: usize = 0b1 << 63;
const TK_MATCH_MASK: usize = 0b1 << 62;
const TK_VALUE_MASK: usize = !(0b11 << 62);

const TK_STORE_HASH: usize = 0b0 << 63;
const TK_STORE_INDEX: usize = 0b1 << 63;
const TK_MATCH_EXACT: usize = 0b0 << 62;
const TK_MATCH_CUSTOM: usize = 0b1 << 62;
const BITS_PER_ID: u32 = usize::BITS - 2;

const TK_STORE_MASK: usize = 0b10 << BITS_PER_ID;
const TK_MATCH_MASK: usize = 0b01 << BITS_PER_ID;
const TK_VALUE_MASK: usize = !(0b11 << BITS_PER_ID);

const TK_STORE_HASH: usize = 0b00 << BITS_PER_ID;
const TK_STORE_INDEX: usize = 0b10 << BITS_PER_ID;
const TK_MATCH_EXACT: usize = 0b00 << BITS_PER_ID;
const TK_MATCH_CUSTOM: usize = 0b01 << BITS_PER_ID;

/// Compact representation of the atom from the trie. It represents each
/// atom using single [usize] value. It keeps value of the key, key matching
Expand Down
2 changes: 1 addition & 1 deletion python/install-hyperonc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "hyperonc repository URL: $HYPERONC_URL"
echo "hyperonc revision: $HYPERONC_REV"

if test "$AUDITWHEEL_POLICY" = "manylinux2014"; then
yum install -y perl-devel openssl-devel zlib-devel
yum install -y perl-devel openssl-devel zlib-devel libatomic
fi

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh
Expand Down

0 comments on commit 1017274

Please sign in to comment.