MCPcopy Create free account
hub / github.com/dmlc/parameter_server / rowBlock

Method rowBlock

src/util/sparse_matrix.h:171–183  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169
170template<typename I, typename V>
171MatrixPtr<V> SparseMatrix<I,V>::rowBlock(SizeR range) const {
172 CHECK(rowMajor());
173 CHECK(!range.empty());
174
175 auto new_offset = offset_.segment(SizeR(range.begin(), range.end()+1));
176
177 auto new_info = info_;
178 range.to(new_info.mutable_row());
179 new_info.set_nnz(new_offset.back() - new_offset.front());
180
181 return MatrixPtr<V>(new SparseMatrix<I,V>(new_info, new_offset, index_, value_));
182 // return static_cast<Matrix>(re);
183}
184
185template<typename I, typename V>
186MatrixPtr<V> SparseMatrix<I,V>::alterStorage() const {

Callers

nothing calls this directly

Calls 9

segmentMethod · 0.80
toMethod · 0.80
mutable_rowMethod · 0.80
backMethod · 0.80
frontMethod · 0.80
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
set_nnzMethod · 0.45

Tested by

no test coverage detected