v1.rs
benches/minima/src/tables/memory/v1.rs
1use cdk_rsx_collections::nyxus::{Box, Map, NyxusData};2use cdk_rsx_collections_minima::{3 BitmapSet, BlockedBloomFilter, FixedVec, FrozenHashMap, FrozenHashSet, FrozenPrefixSums,4 FrozenSortedMap, MinimaHll, SlotArena,5};6#[repr(C)]7#[derive(NyxusData)]8pub struct Data {9 pub(in crate::tables) arena: cdk_rsx_engine_minima::Root,10 pub(in crate::tables) values: FixedVec<u64>,11 pub(in crate::tables) slots: SlotArena<u64>,12 pub(in crate::tables) bitmap: BitmapSet,13 pub(in crate::tables) bloom: Option<Box<BlockedBloomFilter<u64>>>,14 pub(in crate::tables) hll12: MinimaHll<u64, 12>,15 pub(in crate::tables) hll14: MinimaHll<u64, 14>,16 pub(in crate::tables) hll16: MinimaHll<u64, 16>,17 pub(in crate::tables) set: Option<Box<FrozenHashSet<u64>>>,18 pub(in crate::tables) hash: Option<Box<FrozenHashMap<u64, u64>>>,19 pub(in crate::tables) sorted: Option<Box<FrozenSortedMap<u64, u64>>>,20 pub(in crate::tables) prefix: Option<Box<FrozenPrefixSums>>,21 pub(in crate::tables) native: Map<u64, u64>,22}23cdk_rsx_store::module_children! { pub struct Children {24 pub(in crate::tables) baseline: cdk_rsx_store::ChildSlot<crate::tables::baseline::memory::v1::Memory>,25} }26#[cdk_rsx_store::memory(owner = crate::tables, children = Children, dependencies = [27 if cfg!(feature = "reject-contract") { [0xf3; 32] } else { cdk_rsx_engine_minima::MINIMA_POLICY },28 MinimaHll::<u64,8>::CONTRACT,29 cdk_rsx_collections_minima::CountMinSketch::<u64>::CONTRACT,30 cdk_rsx_collections_minima::CuckooFilter::<u64>::CONTRACT,31 MinimaHll::<u64,12>::CONTRACT,32 MinimaHll::<u64,14>::CONTRACT,33 MinimaHll::<u64,16>::CONTRACT,34 BlockedBloomFilter::<u64>::CONTRACT,35 FixedVec::<u64>::CONTRACT,36 SlotArena::<u64>::CONTRACT,37 FrozenHashMap::<u64,u64>::CONTRACT,38 FrozenHashSet::<u64>::CONTRACT,39 FrozenSortedMap::<u64,u64>::CONTRACT,40 cdk_rsx_collections_minima::bitmap_set::BITMAP_SET_POLICY,41 cdk_rsx_collections_minima::prefix_sums::PREFIX_SUMS_POLICY,42])]43pub struct Memory;