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

Method get_memory_ptr

lite/src/mge/tensor_impl.cpp:144–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void* TensorImplDft::get_memory_ptr() const {
145 if (m_get_memory_callback) {
146 m_get_memory_callback(const_cast<TensorImplDft*>(this));
147 }
148 if (is_host()) {
149 return static_cast<void*>(m_host_tensor->raw_ptr());
150 } else {
151 return static_cast<void*>(m_dev_tensor->raw_ptr());
152 }
153}
154
155void* TensorImplDft::get_memory_ptr(const std::vector<size_t>& idx) const {
156 if (m_get_memory_callback) {

Callers 1

share_memory_withMethod · 0.45

Calls 5

size_logMethod · 0.80
raw_ptrMethod · 0.45
layoutMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected