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

Class Workspace

dnn/include/megdnn/basic_types.h:513–525  ·  view source on GitHub ↗

* \brief A struct representing workspace. * * It differs from TensorND in that workspace does not have a "layout" concept. */

Source from the content-addressed store, hash-verified

511 * It differs from TensorND in that workspace does not have a "layout" concept.
512 */
513struct Workspace {
514 dt_byte* raw_ptr;
515 size_t size;
516
517 Workspace() : raw_ptr(NULL), size(0) {}
518
519 Workspace(dt_byte* raw_ptr_, size_t size_) : raw_ptr(raw_ptr_), size(size_) {}
520
521 template <typename T>
522 T* ptr(size_t offset_in_bytes = 0) const {
523 return static_cast<T*>(static_cast<void*>(raw_ptr + offset_in_bytes));
524 }
525};
526
527#if MEGDNN_CC_HOST
528

Callers 13

exec_internalMethod · 0.85
exec_internalMethod · 0.85
exec_internalMethod · 0.85
backward_exec_internalFunction · 0.85
backwardMethod · 0.85
execMethod · 0.85
execMethod · 0.85
exec_internalMethod · 0.85
execMethod · 0.85
execMethod · 0.85
execMethod · 0.85
exec_internalMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected