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

Method sum_chunk

src/backed/statistics/mod.rs:76–97  ·  view source on GitHub ↗
(&self, direction: &Direction, reference: &mut [T])

Source from the content-addressed store, hash-verified

74 }
75
76 fn sum_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
77 where
78 T: num_traits::Float + num_traits::NumCast + AddAssign + std::iter::Sum + Send + Sync,
79 {
80 match direction {
81 Direction::COLUMN => {
82 for (chunk, _start, _end) in self.iter::<ArrayData>(1000) {
83 match_array_data_apply_function!(chunk, sum_col_chunk, reference)?;
84 }
85 }
86 Direction::ROW => {
87 for (chunk, start, end) in self.iter::<ArrayData>(1000) {
88 match_array_data_apply_function!(
89 chunk,
90 sum_row_chunk,
91 &mut reference[start..end]
92 )?;
93 }
94 }
95 }
96 Ok(())
97 }
98
99 fn sum_whole_masked<T>(&self, _direction: &Direction, _mask: &[bool]) -> anyhow::Result<Vec<T>>
100 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected