#![expect(clippy::items_after_statements, reason = "Compile time checks")]
use std::mem as StdMem;
use super::LeafNode15;
use crate::nodeversion::NodeVersion;
use crate::permuter::AtomicPermuter15;
use crate::policy::{BoxPolicy, InlinePolicy};
#[cfg(target_pointer_width = "64")]
const _: () = {
use super::WIDTH_15;
use std::sync::atomic::{AtomicPtr, AtomicU8, AtomicU64};
assert!(StdMem::size_of::<LeafNode15<BoxPolicy<u64>>>() == 448);
assert!(StdMem::align_of::<LeafNode15<BoxPolicy<u64>>>() == 64);
assert!(StdMem::size_of::<NodeVersion>() == 4);
assert!(StdMem::size_of::<AtomicPermuter15>() == 8);
assert!(StdMem::size_of::<[AtomicU64; WIDTH_15]>() == 120);
assert!(StdMem::size_of::<[AtomicU8; WIDTH_15]>() == 15);
assert!(StdMem::size_of::<[AtomicPtr<u8>; WIDTH_15]>() == 120);
};
#[cfg(target_pointer_width = "64")]
const _: () = {
use std::mem::offset_of;
type Leaf = LeafNode15<BoxPolicy<u64>>;
assert!(offset_of!(Leaf, version) == 0);
assert!(offset_of!(Leaf, modstate) == 4);
assert!(offset_of!(Leaf, _pad0) == 5);
assert!(offset_of!(Leaf, permutation) == 64);
assert!(offset_of!(Leaf, _pad1) == 72);
assert!(offset_of!(Leaf, ikey0) == 128);
assert!(offset_of!(Leaf, keylenx) == 248);
assert!(offset_of!(Leaf, values) == 264);
assert!(offset_of!(Leaf, suffix) == 384);
assert!(offset_of!(Leaf, next) == 392);
assert!(offset_of!(Leaf, prev) == 400);
assert!(offset_of!(Leaf, parent) == 408);
};
#[cfg(all(
target_pointer_width = "64",
not(feature = "sidecar-suffix"),
not(feature = "small-suffix-capacity")
))]
const _: () = {
assert!(StdMem::size_of::<LeafNode15<InlinePolicy<u64>>>() == 1152);
assert!(StdMem::align_of::<LeafNode15<InlinePolicy<u64>>>() == 64);
};
#[cfg(all(
target_pointer_width = "64",
not(feature = "sidecar-suffix"),
feature = "small-suffix-capacity"
))]
const _: () = {
assert!(StdMem::size_of::<LeafNode15<InlinePolicy<u64>>>() == 896);
assert!(StdMem::align_of::<LeafNode15<InlinePolicy<u64>>>() == 64);
};
#[cfg(all(target_pointer_width = "64", feature = "sidecar-suffix"))]
const _: () = {
assert!(StdMem::size_of::<LeafNode15<InlinePolicy<u64>>>() == 576);
assert!(StdMem::align_of::<LeafNode15<InlinePolicy<u64>>>() == 64);
};
#[cfg(target_pointer_width = "64")]
const _: () = {
use std::mem::offset_of;
type Leaf = LeafNode15<InlinePolicy<u64>>;
assert!(offset_of!(Leaf, version) == 0);
assert!(offset_of!(Leaf, modstate) == 4);
assert!(offset_of!(Leaf, permutation) == 64);
assert!(offset_of!(Leaf, ikey0) == 128);
assert!(offset_of!(Leaf, keylenx) == 248);
assert!(offset_of!(Leaf, values) == 264);
assert!(offset_of!(Leaf, suffix) == 504);
};
#[cfg(target_pointer_width = "64")]
const _: () = {
use std::mem::offset_of;
type ArcLeaf = LeafNode15<BoxPolicy<u64>>;
type InlineLeaf = LeafNode15<InlinePolicy<u64>>;
assert!(offset_of!(ArcLeaf, permutation) == 64);
assert!(offset_of!(InlineLeaf, permutation) == 64);
assert!(offset_of!(ArcLeaf, ikey0) == 128);
assert!(offset_of!(InlineLeaf, ikey0) == 128);
assert!(offset_of!(ArcLeaf, values) == 264);
assert!(offset_of!(InlineLeaf, values) == 264);
const IKEY_OFFSET: usize = 128;
const IKEY8_END: usize = IKEY_OFFSET + 8 * 8;
assert!(IKEY8_END == 192);
};