1 #ifndef TH_GENERIC_FILE 2 #define TH_GENERIC_FILE "TH/generic/THStorage.h" 5 #include <c10/core/Allocator.h> 6 #include <c10/core/StorageImpl.h> 24 #define THStorage at::StorageImpl 28 #define THFloatStorage THStorage 29 #define THDoubleStorage THStorage 30 #define THHalfStorage THStorage 31 #define THByteStorage THStorage 32 #define THCharStorage THStorage 33 #define THShortStorage THStorage 34 #define THIntStorage THStorage 35 #define THLongStorage THStorage 36 #define THBoolStorage THStorage 38 TH_API scalar_t* THStorage_(data)(
const THStorage*);
39 TH_API ptrdiff_t THStorage_(size)(
const THStorage*);
40 TH_API
size_t THStorage_(elementSize)(void);
43 TH_API
void THStorage_(
set)(THStorage*, ptrdiff_t, scalar_t);
44 TH_API scalar_t THStorage_(
get)(
const THStorage*, ptrdiff_t);
46 TH_API THStorage* THStorage_(
new)(void);
47 TH_API THStorage* THStorage_(newWithSize)(ptrdiff_t size);
48 TH_API THStorage* THStorage_(newWithSize1)(scalar_t);
49 TH_API THStorage* THStorage_(newWithSize2)(scalar_t, scalar_t);
50 TH_API THStorage* THStorage_(newWithSize3)(scalar_t, scalar_t, scalar_t);
51 TH_API THStorage* THStorage_(newWithSize4)(scalar_t, scalar_t, scalar_t, scalar_t);
52 TH_API THStorage* THStorage_(newWithMapping)(
const char *filename, ptrdiff_t size,
int flags);
54 TH_API THStorage* THStorage_(newWithAllocator)(ptrdiff_t size,
56 TH_API THStorage* THStorage_(newWithDataAndAllocator)(
60 TH_API
void THStorage_(setFlag)(THStorage *storage,
const char flag);
61 TH_API
void THStorage_(clearFlag)(THStorage *storage,
const char flag);
62 TH_API
void THStorage_(retain)(THStorage *storage);
63 TH_API
void THStorage_(swap)(THStorage *storage1, THStorage *storage2);
66 TH_API
void THStorage_(free)(THStorage *storage);
67 TH_API
void THStorage_(resize)(THStorage *storage, ptrdiff_t size);
68 TH_API
void THStorage_(fill)(THStorage *storage, scalar_t value);