MCPcopy Create free account
hub / github.com/PsiACE/bitsvec / BitBlock

Interface BitBlock

src/lib.rs:1197–1224  ·  view source on GitHub ↗

BitBlock is the basic building block for internal storage BitVec is expected to be aligned properly

Source from the content-addressed store, hash-verified

1195// BitBlock is the basic building block for internal storage
1196// BitVec is expected to be aligned properly
1197pub trait BitBlock<const L: usize>:
1198 Not<Output = Self>
1199 + BitAnd<Output = Self>
1200 + BitOr<Output = Self>
1201 + BitXor<Output = Self>
1202 + Add<Output = Self>
1203 + Sub<Output = Self>
1204 + Eq
1205 + Sized
1206 + Copy
1207 + Clone
1208 + Debug
1209 + From<[Self::Item; L]>
1210{
1211 type Item: BitBlockItem;
1212 const BIT_WIDTH: usize;
1213 const ELEMENT_BIT_WIDTH: usize;
1214 const LANES: usize;
1215 const ZERO_ELEMENT: Self::Item;
1216 const ONE_ELEMENT: Self::Item;
1217 const MAX_ELEMENT: Self::Item;
1218 const ZERO: Self;
1219 const MAX: Self;
1220 fn to_array(self) -> [Self::Item; L];
1221 fn and_inplace(&mut self, rhs: &Self);
1222 fn or_inplace(&mut self, rhs: &Self);
1223 fn xor_inplace(&mut self, rhs: &Self);
1224}
1225
1226macro_rules! impl_bitblock {
1227 ($type: ty, $item_type: ty, $lanes: expr) => {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected