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

Method sum_chunk

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

Source from the content-addressed store, hash-verified

103 }
104
105 fn sum_chunk<T>(&self, direction: &Direction, reference: &mut [T]) -> anyhow::Result<()>
106 where
107 T: num_traits::Float
108 + num_traits::NumCast
109 + std::ops::AddAssign
110 + std::iter::Sum
111 + Send
112 + Sync,
113 {
114 let read_guard = self.0.read_inner();
115 let data = read_guard.deref();
116 match direction {
117 Direction::COLUMN => {
118 match_array_data_apply_function!(data, sum_col_chunk, reference)
119 }
120 Direction::ROW => {
121 match_array_data_apply_function!(data, sum_row_chunk, reference)
122 }
123 }
124 }
125
126 fn sum_whole_masked<T>(&self, direction: &Direction, mask: &[bool]) -> anyhow::Result<Vec<T>>
127 where

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected