MCPcopy Create free account
hub / github.com/SingleRust/SingleRust / nonzero_whole

Method nonzero_whole

src/backed/statistics/mod.rs:14–25  ·  view source on GitHub ↗
(&self, direction: &Direction)

Source from the content-addressed store, hash-verified

12
13impl<B: Backend> ComputeNonZero for ArrayElem<B> {
14 fn nonzero_whole<T>(&self, direction: &Direction) -> anyhow::Result<Vec<T>>
15 where
16 T: PrimInt + Unsigned + Zero + AddAssign + Send + Sync,
17 {
18 let x_data = self.get::<ArrayData>()?.expect("X matrix not found!");
19 match direction {
20 Direction::COLUMN => {
21 match_array_data_apply_function!(x_data, nonzero_col)
22 }
23 Direction::ROW => match_array_data_apply_function!(x_data, nonzero_row),
24 }
25 }
26
27 fn nonzero_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
28 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected