sp1_core_machine/bytes/
columns.rs1use sp1_derive::AlignedBorrow;
2use std::mem::size_of;
3use struct_reflection::{StructReflection, StructReflectionHelper};
4
5use super::NUM_BYTE_OPS;
6
7pub const NUM_BYTE_PREPROCESSED_COLS: usize = size_of::<BytePreprocessedCols<u8>>();
9
10pub const NUM_BYTE_MULT_COLS: usize = size_of::<ByteMultCols<u8>>();
12
13#[derive(Debug, Clone, Copy, AlignedBorrow, StructReflection)]
14#[repr(C)]
15pub struct BytePreprocessedCols<T> {
16 pub b: T,
18
19 pub c: T,
21
22 pub and: T,
24
25 pub or: T,
27
28 pub xor: T,
30
31 pub ltu: T,
33
34 pub msb: T,
36}
37
38#[derive(Debug, Clone, Copy, AlignedBorrow)]
41#[repr(C)]
42pub struct ByteMultCols<T> {
43 pub multiplicities: [T; NUM_BYTE_OPS],
45}