MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / merge_with

Method merge_with

src/core/impl/tensor.cpp:190–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190void SubTensorSpec::merge_with(const SubTensorSpec& rhs) {
191 mgb_assert(
192 m_layout.dtype.valid() && m_layout.dtype == rhs.m_layout.dtype &&
193 rhs.m_layout.ndim);
194 m_offset_elem += rhs.m_offset_elem;
195 m_layout = rhs.m_layout;
196}
197
198/* ===================== TensorStorage ===================== */
199

Callers 3

sliceMethod · 0.45
tensor.cppFile · 0.45
do_make_sub_specMethod · 0.45

Calls 1

validMethod · 0.45

Tested by

no test coverage detected