-
Notifications
You must be signed in to change notification settings - Fork 1
/
Storage.h
70 lines (59 loc) · 2.51 KB
/
Storage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#ifndef THP_STORAGE_INC
#define THP_STORAGE_INC
#define THPStorageStr TH_CONCAT_STRING_3(torch.,Real,Storage)
#define THPStorageClass TH_CONCAT_3(THP,Real,StorageClass)
#define THPStorage_(NAME) TH_CONCAT_4(THP,Real,Storage_,NAME)
#define THPDoubleStorage_Check(obj) \
PyObject_IsInstance(obj, THPDoubleStorageClass)
#define THPFloatStorage_Check(obj) \
PyObject_IsInstance(obj, THPFloatStorageClass)
#define THPHalfStorage_Check(obj) \
PyObject_IsInstance(obj, THPFloatStorageClass)
#define THPLongStorage_Check(obj) \
PyObject_IsInstance(obj, THPLongStorageClass)
#define THPIntStorage_Check(obj) \
PyObject_IsInstance(obj, THPIntStorageClass)
#define THPShortStorage_Check(obj) \
PyObject_IsInstance(obj, THPShortStorageClass)
#define THPCharStorage_Check(obj) \
PyObject_IsInstance(obj, THPCharStorageClass)
#define THPByteStorage_Check(obj) \
PyObject_IsInstance(obj, THPByteStorageClass)
#define THPBoolStorage_Check(obj) \
PyObject_IsInstance(obj, THPBoolStorageClass)
#define THPQUInt8Storage_Check(obj) \
PyObject_IsInstance(obj, THPQUInt8StorageClass)
#define THPQInt8Storage_Check(obj) \
PyObject_IsInstance(obj, THPQInt8StorageClass)
#define THPQInt32Storage_Check(obj) \
PyObject_IsInstance(obj, THPQInt32StorageClass)
#define THPBFloat16Storage_Check(obj) \
PyObject_IsInstance(obj, THPBFloat16StorageClass)
#define THPDoubleStorage_CData(obj) (obj)->cdata
#define THPFloatStorage_CData(obj) (obj)->cdata
#define THPHalfStorage_CData(obj) (obj)->cdata
#define THPLongStorage_CData(obj) (obj)->cdata
#define THPIntStorage_CData(obj) (obj)->cdata
#define THPShortStorage_CData(obj) (obj)->cdata
#define THPCharStorage_CData(obj) (obj)->cdata
#define THPByteStorage_CData(obj) (obj)->cdata
#define THPBoolStorage_CData(obj) (obj)->cdata
#define THPQUInt8Storage_CData(obj) (obj)->cdata
#define THPQInt8Storage_CData(obj) (obj)->cdata
#define THPQInt32Storage_CData(obj) (obj)->cdata
#define THPBFloat16Storage_CData(obj) (obj)->cdata
#ifdef _THP_CORE
#define THPStorageType TH_CONCAT_3(THP,Real,StorageType)
#define THPStorageBaseStr TH_CONCAT_STRING_2(Real,StorageBase)
#endif
#include <torch/csrc/generic/Storage.h>
#include <TH/THGenerateAllTypes.h>
#include <torch/csrc/generic/Storage.h>
#include <TH/THGenerateHalfType.h>
#include <torch/csrc/generic/Storage.h>
#include <TH/THGenerateBoolType.h>
#include <torch/csrc/generic/Storage.h>
#include <TH/THGenerateBFloat16Type.h>
#include <torch/csrc/generic/Storage.h>
#include <TH/THGenerateQTypes.h>
#endif