openvm-stark-backend 2.0.0

Multi-matrix STARK backend for the SWIRL proof system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use core::borrow::Borrow;

#[repr(C)]
pub struct FibonacciSelectorCols<F> {
    pub sel: F,
}

// Manual implementation of AlignedBorrow to avoid circular git import
impl<F> Borrow<FibonacciSelectorCols<F>> for [F] {
    fn borrow(&self) -> &FibonacciSelectorCols<F> {
        debug_assert_eq!(self.len(), 1);
        let (prefix, shorts, suffix) = unsafe { self.align_to::<FibonacciSelectorCols<F>>() };
        debug_assert!(prefix.is_empty(), "Alignment should match");
        debug_assert!(suffix.is_empty(), "Alignment should match");
        debug_assert_eq!(shorts.len(), 1);
        &shorts[0]
    }
}