Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Member Functions | Static Public Member Functions | Protected Attributes
c10::Storage Struct Reference

Public Member Functions

 Storage (c10::intrusive_ptr< StorageImpl > ptr)
 
 Storage (caffe2::TypeMeta data_type, size_t size, Allocator *allocator, bool resizable)
 
 Storage (caffe2::TypeMeta data_type, int64_t numel, at::DataPtr data_ptr, at::Allocator *allocator, bool resizable)
 
template<typename T >
bool IsType () const
 
template<typename T >
Tdata () const
 
template<typename T >
Tunsafe_data () const
 
size_t elementSize () const
 
size_t itemsize () const
 
ptrdiff_t size () const
 
int64_t numel () const
 
void set_numel (int64_t numel) const
 
bool resizable () const
 
size_t capacity () const
 
void * data () const
 
const caffe2::TypeMetadtype () const
 
at::DataPtrdata_ptr ()
 
const at::DataPtrdata_ptr () const
 
at::DataPtr set_data_ptr (at::DataPtr &&data_ptr) const
 
void set_dtype (const caffe2::TypeMeta &data_type) const
 
DeviceType device_type () const
 
at::Allocatorallocator () const
 
at::Device device () const
 
StorageImplunsafeReleaseStorageImpl ()
 
StorageImplunsafeGetStorageImpl () const noexcept
 
 operator bool () const
 
size_t use_count () const
 
bool unique () const
 
bool is_alias_of (const Storage &other) const
 
void UniqueStorageShareExternalPointer (void *src, const caffe2::TypeMeta &data_type, size_t capacity, DeleterFnPtr d=nullptr)
 
void UniqueStorageShareExternalPointer (at::DataPtr &&data_ptr, const caffe2::TypeMeta &data_type, size_t capacity)
 

Static Public Member Functions

static Storage create_legacy (at::Device device, caffe2::TypeMeta data_type)
 

Protected Attributes

c10::intrusive_ptr< StorageImplstorage_impl_
 

Detailed Description

Definition at line 7 of file Storage.h.


The documentation for this struct was generated from the following file: