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

Method rowBlock

src/util/dense_matrix.h:36–42  ·  view source on GitHub ↗

non-copy matrix block

Source from the content-addressed store, hash-verified

34
35 // non-copy matrix block
36 virtual MatrixPtr<V> rowBlock(SizeR range) const {
37 if (colMajor()) CHECK_EQ(range, SizeR(0, rows()));
38 auto info = info_;
39 range.to(info.mutable_row());
40 info.set_nnz(range.size() * cols());
41 return MatrixPtr<V>(new DenseMatrix<V>(info, value_.segment(range*cols())));
42 }
43
44 virtual MatrixPtr<V> colBlock(SizeR range) const {
45 if (rowMajor()) CHECK_EQ(range, SizeR(0, cols()));

Callers

nothing calls this directly

Calls 5

toMethod · 0.80
mutable_rowMethod · 0.80
segmentMethod · 0.80
set_nnzMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected