3#include <initializer_list>
62 virtual _DT *
gpu(
size_t size) {
65 virtual _DT *
cpu(
size_t size) {
72 virtual inline _DT *
gpu()
const {
return (_DT *)
gpu_; }
73 virtual inline _DT *
cpu()
const {
return (_DT *)
cpu_; }
virtual void * get_cpu() const
virtual void * get_gpu() const
virtual void * gpu_realloc(size_t bytes)
BaseMemory(void *cpu, size_t cpu_bytes, void *gpu, size_t gpu_bytes)
virtual void * cpu_realloc(size_t bytes)
void reference(void *cpu, size_t cpu_bytes, void *gpu, size_t gpu_bytes)
void set_shared_memory(const BaseMemory &other)
std::shared_ptr< void > cpu_ptr_
std::shared_ptr< void > gpu_ptr_
Memory(const Memory &other)
virtual _DT * gpu() const
virtual _DT * cpu() const
virtual _DT * cpu(size_t size)
virtual _DT * gpu(size_t size)
Memory & operator=(const Memory &other)