1 #ifndef THC_GENERIC_FILE 2 #define THC_GENERIC_FILE "THC/generic/THCStorage.h" 5 #define THCStorage THStorage 9 #define THCudaStorage THCStorage 10 #define THCudaDoubleStorage THCStorage 11 #define THCudaHalfStorage THCStorage 12 #define THCudaByteStorage THCStorage 13 #define THCudaCharStorage THCStorage 14 #define THCudaShortStorage THCStorage 15 #define THCudaIntStorage THCStorage 16 #define THCudaLongStorage THCStorage 17 #define THCudaBoolStorage THCStorage 19 THC_API scalar_t* THCStorage_(data)(THCState *state,
const THCStorage*);
20 THC_API ptrdiff_t THCStorage_(size)(THCState *state,
const THCStorage*);
21 THC_API
int THCStorage_(elementSize)(THCState *state);
24 THC_API
void THCStorage_(
set)(THCState *state, THCStorage*, ptrdiff_t, scalar_t);
25 THC_API scalar_t THCStorage_(
get)(THCState *state,
const THCStorage*, ptrdiff_t);
27 THC_API THCStorage* THCStorage_(
new)(THCState *state);
28 THC_API THCStorage* THCStorage_(newWithSize)(THCState *state, ptrdiff_t size);
29 THC_API THCStorage* THCStorage_(newWithSize1)(THCState *state, scalar_t);
30 THC_API THCStorage* THCStorage_(newWithSize2)(THCState *state, scalar_t, scalar_t);
31 THC_API THCStorage* THCStorage_(newWithSize3)(THCState *state, scalar_t, scalar_t, scalar_t);
32 THC_API THCStorage* THCStorage_(newWithSize4)(THCState *state, scalar_t, scalar_t, scalar_t, scalar_t);
33 THC_API THCStorage* THCStorage_(newWithMapping)(THCState *state,
const char *filename, ptrdiff_t size,
int shared);
35 THC_API THCStorage* THCStorage_(newWithAllocator)(
36 THCState *state, ptrdiff_t size,
38 THC_API THCStorage* THCStorage_(newWithDataAndAllocator)(
39 THCState *state,
at::DataPtr&& data, ptrdiff_t size,
42 THC_API
void THCStorage_(setFlag)(THCState *state, THCStorage *storage,
const char flag);
43 THC_API
void THCStorage_(clearFlag)(THCState *state, THCStorage *storage,
const char flag);
44 THC_API
void THCStorage_(retain)(THCState *state, THCStorage *storage);
46 THC_API
void THCStorage_(free)(THCState *state, THCStorage *storage);
47 THC_API
void THCStorage_(resize)(THCState *state, THCStorage *storage, ptrdiff_t size);
48 THC_API
void THCStorage_(fill)(THCState *state, THCStorage *storage, scalar_t value);
50 THC_API
int THCStorage_(getDevice)(THCState* state,
const THCStorage* storage);