p3_matrix::extension

Struct FlatMatrixView

Source
pub struct FlatMatrixView<F, EF, Inner>(/* private fields */);
Expand description

Flattens a matrix of extension field elements to one of base field elements. The flattening is done horizontally, resulting in a wider matrix.

Implementations§

Source§

impl<F, EF, Inner> FlatMatrixView<F, EF, Inner>

Source

pub fn new(inner: Inner) -> Self

Source

pub fn inner_ref(&self) -> &Inner

Trait Implementations§

Source§

impl<F: Debug, EF: Debug, Inner: Debug> Debug for FlatMatrixView<F, EF, Inner>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<F, EF, Inner> Matrix<F> for FlatMatrixView<F, EF, Inner>
where F: Field, EF: ExtensionField<F>, Inner: Matrix<EF>,

Source§

type Row<'a> = FlatIter<F, <Inner as Matrix<EF>>::Row<'a>> where Self: 'a

Source§

fn width(&self) -> usize

Source§

fn height(&self) -> usize

Source§

fn row(&self, r: usize) -> Self::Row<'_>

Source§

fn row_slice(&self, r: usize) -> impl Deref<Target = [F]>

Source§

fn dimensions(&self) -> Dimensions

Source§

fn get(&self, r: usize, c: usize) -> T

Source§

fn rows(&self) -> impl Iterator<Item = Self::Row<'_>>

Source§

fn par_rows(&self) -> impl IndexedParallelIterator<Item = Self::Row<'_>>

Source§

fn first_row(&self) -> Self::Row<'_>

Source§

fn last_row(&self) -> Self::Row<'_>

Source§

fn to_row_major_matrix(self) -> RowMajorMatrix<T>
where Self: Sized, T: Clone,

Source§

fn horizontally_packed_row<'a, P>( &'a self, r: usize, ) -> (impl Iterator<Item = P> + Send + Sync, impl Iterator<Item = T> + Send + Sync)
where P: PackedValue<Value = T>, T: Clone + 'a,

Source§

fn padded_horizontally_packed_row<'a, P>( &'a self, r: usize, ) -> impl Iterator<Item = P> + Send + Sync
where P: PackedValue<Value = T>, T: Clone + Default + 'a,

Zero padded.
Source§

fn par_horizontally_packed_rows<'a, P>( &'a self, ) -> impl IndexedParallelIterator<Item = (impl Iterator<Item = P> + Send + Sync, impl Iterator<Item = T> + Send + Sync)>
where P: PackedValue<Value = T>, T: Clone + 'a,

Source§

fn par_padded_horizontally_packed_rows<'a, P>( &'a self, ) -> impl IndexedParallelIterator<Item = impl Iterator<Item = P> + Send + Sync>
where P: PackedValue<Value = T>, T: Clone + Default + 'a,

Source§

fn vertically_packed_row<P>(&self, r: usize) -> impl Iterator<Item = P>
where T: Copy, P: PackedValue<Value = T>,

Pack together a collection of adjacent rows from the matrix. Read more
Source§

fn vertically_packed_row_pair<P>(&self, r: usize, step: usize) -> Vec<P>
where T: Copy, P: PackedValue<Value = T>,

Pack together a collection of rows and “next” rows from the matrix. Read more
Source§

fn vertically_strided( self, stride: usize, offset: usize, ) -> VerticallyStridedMatrixView<Self>
where Self: Sized,

Source§

fn columnwise_dot_product<EF>(&self, v: &[EF]) -> Vec<EF>
where T: Field, EF: ExtensionField<T>,

Compute Mᵀv, aka premultiply this matrix by the given vector, aka scale each row by the corresponding entry in v and take the sum across rows. v can be a vector of extension elements.
Source§

fn dot_ext_powers<EF>( &self, base: EF, ) -> impl IndexedParallelIterator<Item = EF>
where T: Field, EF: ExtensionField<T>,

Multiply this matrix by the vector of powers of base, which is an extension element.

Auto Trait Implementations§

§

impl<F, EF, Inner> Freeze for FlatMatrixView<F, EF, Inner>
where Inner: Freeze,

§

impl<F, EF, Inner> RefUnwindSafe for FlatMatrixView<F, EF, Inner>

§

impl<F, EF, Inner> Send for FlatMatrixView<F, EF, Inner>
where Inner: Send, F: Send, EF: Send,

§

impl<F, EF, Inner> Sync for FlatMatrixView<F, EF, Inner>
where Inner: Sync, F: Sync, EF: Sync,

§

impl<F, EF, Inner> Unpin for FlatMatrixView<F, EF, Inner>
where Inner: Unpin, F: Unpin, EF: Unpin,

§

impl<F, EF, Inner> UnwindSafe for FlatMatrixView<F, EF, Inner>
where Inner: UnwindSafe, F: UnwindSafe, EF: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize = _

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more