MCPcopy Create free account
hub / github.com/pybind/pybind11 / DiscontiguousMatrix

Method DiscontiguousMatrix

tests/test_buffers.cpp:219–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217 class DiscontiguousMatrix : public Matrix {
218 public:
219 DiscontiguousMatrix(py::ssize_t rows,
220 py::ssize_t cols,
221 py::ssize_t row_factor,
222 py::ssize_t col_factor)
223 : Matrix(rows * row_factor, cols * col_factor), m_row_factor(row_factor),
224 m_col_factor(col_factor) {
225 print_created(this,
226 std::to_string(rows) + "(*" + std::to_string(row_factor) + ")x"
227 + std::to_string(cols) + "(*" + std::to_string(col_factor)
228 + ") matrix");
229 }
230 DiscontiguousMatrix(const DiscontiguousMatrix &) = delete;
231 ~DiscontiguousMatrix() {
232 print_destroyed(this,

Callers 2

Calls 1

print_createdFunction · 0.85

Tested by

no test coverage detected