use pstd::{
BoxA, RcA, RcStrA, StringA, VecA,
collections::btree_map::CustomTuning,
collections::{BTreeMapA, BTreeSetA, DefaultHashBuilder, HashMap},
};
pub use pstd::localalloc::{Local, Perm, Temp, GTemp};
pub fn local() -> Local {
Local::new()
}
pub fn temp() -> Temp {
Temp::new()
}
pub fn gtemp() -> GTemp {
GTemp::new()
}
pub type TBox<T> = BoxA<T, Temp>;
pub type TVec<T> = VecA<T, Temp>;
pub type LBox<T> = BoxA<T, Local>;
pub type LRc<T> = RcA<T, Local>;
pub type LRcStr = RcStrA<Local>;
pub type LVec<T> = VecA<T, Local>;
pub type LString = StringA<Local>;
pub type GBox<T> = BoxA<T, GTemp>;
pub type GRc<T> = RcA<T, GTemp>;
pub type GString = StringA<GTemp>;
pub type GVec<T> = VecA<T, GTemp>;
pub type GBTreeMap<K, V> = BTreeMapA<K, V, CustomTuning<GTemp>>;
pub type LBTreeMap<K, V> = BTreeMapA<K, V, CustomTuning<Local>>;
pub type LBTreeSet<T> = BTreeSetA<T, CustomTuning<Local>>;
pub type LHashMap<K, V> = HashMap<K, V, DefaultHashBuilder, Local>;
pub fn lhashmap<K, V>() -> LHashMap<K, V> {
LHashMap::new_in(local())
}
#[macro_export]
macro_rules! lbox {
($val:expr) => {
pstd::unsize_box!(LBox::new($val))
};
}
#[macro_export]
macro_rules! gbox {
($val:expr) => {
pstd::unsize_box!(GBox::new($val))
};
}