Class CompNode::ImplBase

Nested Relationships

This class is a nested type of Class CompNode.

Inheritance Relationships

Base Types

  • public NonCopyableObj

  • public DynTypeObj

Class Documentation

class mgb::CompNode::ImplBase : public NonCopyableObj, public DynTypeObj

Public Types

typedef void (*free_func_t)(ImplBase *self, void *ptr)

Public Functions

void *alloc_device(size_t size) = 0
void *alloc_host(size_t size) = 0
void copy_to_host(void *host_ptr, const void *device_ptr, size_t size) = 0
void copy_to_device(void *device_ptr, const void *host_ptr, size_t size) = 0
void peer_copy_to(Impl *dest_impl, void *dest, const void *src, size_t size) = 0
size_t get_mem_addr_alignment() = 0
size_t get_mem_padding()
std::unique_ptr<Event> create_event(size_t flags) = 0
void sync() = 0
MemNode mem_node() = 0
std::pair<size_t, size_t> get_mem_status_bytes() = 0
Locator locator() = 0
Locator locator_logical() = 0
std::unique_ptr<CompNodeSeqRecorder> create_seq_recorder(cg::ComputingGraph *cg)
void add_callback(megdnn::thin_function<void()>&&)
uint64_t get_uid()

Public Members

const free_func_t free_device

memory free might be called after finalize(); so we should not rely on virtual function for this

const free_func_t free_host

Protected Functions

ImplBase(free_func_t fd, free_func_t fh)
~ImplBase() = default