Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Static Public Member Functions | Protected Attributes
THMapAllocator Class Reference
Inheritance diagram for THMapAllocator:
THRefcountedMapAllocator

Public Member Functions

 THMapAllocator (const char *filename, int flags, size_t size)
 
 THMapAllocator (WithFd, const char *filename, int fd, int flags, size_t size)
 
 THMapAllocator (const THMapAllocator &)=delete
 
THMapAllocatoroperator= (const THMapAllocator &)=delete
 
 THMapAllocator (THMapAllocator &&)=delete
 
THMapAllocatoroperator= (THMapAllocator &&)=delete
 
const char * filename () const
 
int fd () const
 
ptrdiff_t size () const
 
virtual void * data () const
 
virtual void close ()
 

Static Public Member Functions

static THMapAllocatorfromDataPtr (const at::DataPtr &)
 
static at::DataPtr makeDataPtr (const char *filename, int flags, size_t size, size_t *actual_size_out)
 
static at::DataPtr makeDataPtr (WithFd, const char *filename, int fd, int flags, size_t size, size_t *actual_size_out)
 

Protected Attributes

bool closed_ = false
 
std::string filename_
 
int flags_ = 0
 
ptrdiff_t size_
 
int fd_ = -1
 
void * base_ptr_ = nullptr
 

Detailed Description

Definition at line 24 of file THAllocator.h.


The documentation for this class was generated from the following files: