This repository has been archived on 2024-10-16. You can view files and clone it, but cannot push or open issues or pull requests.
2023-09-20 18:16:21 +02:00
|
|
|
//* # Tools to work with binary values, memory, storage
|
|
|
|
|
|
|
|
// official binary prefixes, see [https://en.wikipedia.org/wiki/Binary_prefix]
|
|
|
|
/// 2^10
|
|
|
|
pub const KIBI: usize = 2usize.pow(10);
|
|
|
|
/// 2^20
|
|
|
|
pub const MEBI: usize = 2usize.pow(20);
|
|
|
|
/// 2^30
|
|
|
|
pub const GIBI: usize = 2usize.pow(30);
|
|
|
|
/// 2^40
|
|
|
|
pub const TEBI: usize = 2usize.pow(40);
|
|
|
|
/// 2^50
|
|
|
|
pub const PEBI: usize = 2usize.pow(50);
|
|
|
|
/// 2^60
|
|
|
|
pub const EXBI: u128 = 2u128.pow(60);
|
|
|
|
// at this point, `usize` would overflow, so we have to switch to a bigger datatype.
|
|
|
|
/// 2^70
|
|
|
|
pub const ZEBI: u128 = 2u128.pow(70);
|
|
|
|
/// 2^80
|
|
|
|
pub const YOBI: u128 = 2u128.pow(80);
|
|
|
|
|
2023-09-20 15:37:50 +02:00
|
|
|
// use pt_core;
|
2023-09-20 14:28:40 +02:00
|
|
|
pub mod datalayout;
|
2023-09-20 15:37:50 +02:00
|
|
|
pub mod display;
|