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

Method get

dnn/src/common/utils.cpp:166–174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void* WorkspaceBundle::get(size_t i) const {
167 auto addr = reinterpret_cast<uintptr_t>(m_ptr);
168 if (addr % m_align_in_bytes != 0)
169 addr += m_align_in_bytes - addr % m_align_in_bytes;
170 for (size_t j = 0; j < i; ++j) {
171 addr += m_aligned_sizes[j];
172 }
173 return reinterpret_cast<void*>(addr);
174}
175
176size_t WorkspaceBundle::nr_workspace() const {
177 return m_sizes.size();

Callers 15

getAtlasContextMethod · 0.45
stride2_int8x8x32_dotMethod · 0.45
stride1_int8x8x32_dotMethod · 0.45
stride2_quint8_dotMethod · 0.45
stride1_quint8_dotMethod · 0.45
runMethod · 0.45
execMethod · 0.45
MIDOUT_BEGINFunction · 0.45
exec_kernelFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected