noprefix.h 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. #ifndef NPY_NOPREFIX_H
  2. #define NPY_NOPREFIX_H
  3. /*
  4. * You can directly include noprefix.h as a backward
  5. * compatibility measure
  6. */
  7. #ifndef NPY_NO_PREFIX
  8. #include "ndarrayobject.h"
  9. #include "npy_interrupt.h"
  10. #endif
  11. #define SIGSETJMP NPY_SIGSETJMP
  12. #define SIGLONGJMP NPY_SIGLONGJMP
  13. #define SIGJMP_BUF NPY_SIGJMP_BUF
  14. #define MAX_DIMS NPY_MAXDIMS
  15. #define longlong npy_longlong
  16. #define ulonglong npy_ulonglong
  17. #define Bool npy_bool
  18. #define longdouble npy_longdouble
  19. #define byte npy_byte
  20. #ifndef _BSD_SOURCE
  21. #define ushort npy_ushort
  22. #define uint npy_uint
  23. #define ulong npy_ulong
  24. #endif
  25. #define ubyte npy_ubyte
  26. #define ushort npy_ushort
  27. #define uint npy_uint
  28. #define ulong npy_ulong
  29. #define cfloat npy_cfloat
  30. #define cdouble npy_cdouble
  31. #define clongdouble npy_clongdouble
  32. #define Int8 npy_int8
  33. #define UInt8 npy_uint8
  34. #define Int16 npy_int16
  35. #define UInt16 npy_uint16
  36. #define Int32 npy_int32
  37. #define UInt32 npy_uint32
  38. #define Int64 npy_int64
  39. #define UInt64 npy_uint64
  40. #define Int128 npy_int128
  41. #define UInt128 npy_uint128
  42. #define Int256 npy_int256
  43. #define UInt256 npy_uint256
  44. #define Float16 npy_float16
  45. #define Complex32 npy_complex32
  46. #define Float32 npy_float32
  47. #define Complex64 npy_complex64
  48. #define Float64 npy_float64
  49. #define Complex128 npy_complex128
  50. #define Float80 npy_float80
  51. #define Complex160 npy_complex160
  52. #define Float96 npy_float96
  53. #define Complex192 npy_complex192
  54. #define Float128 npy_float128
  55. #define Complex256 npy_complex256
  56. #define intp npy_intp
  57. #define uintp npy_uintp
  58. #define datetime npy_datetime
  59. #define timedelta npy_timedelta
  60. #define SIZEOF_LONGLONG NPY_SIZEOF_LONGLONG
  61. #define SIZEOF_INTP NPY_SIZEOF_INTP
  62. #define SIZEOF_UINTP NPY_SIZEOF_UINTP
  63. #define SIZEOF_HALF NPY_SIZEOF_HALF
  64. #define SIZEOF_LONGDOUBLE NPY_SIZEOF_LONGDOUBLE
  65. #define SIZEOF_DATETIME NPY_SIZEOF_DATETIME
  66. #define SIZEOF_TIMEDELTA NPY_SIZEOF_TIMEDELTA
  67. #define LONGLONG_FMT NPY_LONGLONG_FMT
  68. #define ULONGLONG_FMT NPY_ULONGLONG_FMT
  69. #define LONGLONG_SUFFIX NPY_LONGLONG_SUFFIX
  70. #define ULONGLONG_SUFFIX NPY_ULONGLONG_SUFFIX
  71. #define MAX_INT8 127
  72. #define MIN_INT8 -128
  73. #define MAX_UINT8 255
  74. #define MAX_INT16 32767
  75. #define MIN_INT16 -32768
  76. #define MAX_UINT16 65535
  77. #define MAX_INT32 2147483647
  78. #define MIN_INT32 (-MAX_INT32 - 1)
  79. #define MAX_UINT32 4294967295U
  80. #define MAX_INT64 LONGLONG_SUFFIX(9223372036854775807)
  81. #define MIN_INT64 (-MAX_INT64 - LONGLONG_SUFFIX(1))
  82. #define MAX_UINT64 ULONGLONG_SUFFIX(18446744073709551615)
  83. #define MAX_INT128 LONGLONG_SUFFIX(85070591730234615865843651857942052864)
  84. #define MIN_INT128 (-MAX_INT128 - LONGLONG_SUFFIX(1))
  85. #define MAX_UINT128 ULONGLONG_SUFFIX(170141183460469231731687303715884105728)
  86. #define MAX_INT256 LONGLONG_SUFFIX(57896044618658097711785492504343953926634992332820282019728792003956564819967)
  87. #define MIN_INT256 (-MAX_INT256 - LONGLONG_SUFFIX(1))
  88. #define MAX_UINT256 ULONGLONG_SUFFIX(115792089237316195423570985008687907853269984665640564039457584007913129639935)
  89. #define MAX_BYTE NPY_MAX_BYTE
  90. #define MIN_BYTE NPY_MIN_BYTE
  91. #define MAX_UBYTE NPY_MAX_UBYTE
  92. #define MAX_SHORT NPY_MAX_SHORT
  93. #define MIN_SHORT NPY_MIN_SHORT
  94. #define MAX_USHORT NPY_MAX_USHORT
  95. #define MAX_INT NPY_MAX_INT
  96. #define MIN_INT NPY_MIN_INT
  97. #define MAX_UINT NPY_MAX_UINT
  98. #define MAX_LONG NPY_MAX_LONG
  99. #define MIN_LONG NPY_MIN_LONG
  100. #define MAX_ULONG NPY_MAX_ULONG
  101. #define MAX_LONGLONG NPY_MAX_LONGLONG
  102. #define MIN_LONGLONG NPY_MIN_LONGLONG
  103. #define MAX_ULONGLONG NPY_MAX_ULONGLONG
  104. #define MIN_DATETIME NPY_MIN_DATETIME
  105. #define MAX_DATETIME NPY_MAX_DATETIME
  106. #define MIN_TIMEDELTA NPY_MIN_TIMEDELTA
  107. #define MAX_TIMEDELTA NPY_MAX_TIMEDELTA
  108. #define BITSOF_BOOL NPY_BITSOF_BOOL
  109. #define BITSOF_CHAR NPY_BITSOF_CHAR
  110. #define BITSOF_SHORT NPY_BITSOF_SHORT
  111. #define BITSOF_INT NPY_BITSOF_INT
  112. #define BITSOF_LONG NPY_BITSOF_LONG
  113. #define BITSOF_LONGLONG NPY_BITSOF_LONGLONG
  114. #define BITSOF_HALF NPY_BITSOF_HALF
  115. #define BITSOF_FLOAT NPY_BITSOF_FLOAT
  116. #define BITSOF_DOUBLE NPY_BITSOF_DOUBLE
  117. #define BITSOF_LONGDOUBLE NPY_BITSOF_LONGDOUBLE
  118. #define BITSOF_DATETIME NPY_BITSOF_DATETIME
  119. #define BITSOF_TIMEDELTA NPY_BITSOF_TIMEDELTA
  120. #define _pya_malloc PyArray_malloc
  121. #define _pya_free PyArray_free
  122. #define _pya_realloc PyArray_realloc
  123. #define BEGIN_THREADS_DEF NPY_BEGIN_THREADS_DEF
  124. #define BEGIN_THREADS NPY_BEGIN_THREADS
  125. #define END_THREADS NPY_END_THREADS
  126. #define ALLOW_C_API_DEF NPY_ALLOW_C_API_DEF
  127. #define ALLOW_C_API NPY_ALLOW_C_API
  128. #define DISABLE_C_API NPY_DISABLE_C_API
  129. #define PY_FAIL NPY_FAIL
  130. #define PY_SUCCEED NPY_SUCCEED
  131. #ifndef TRUE
  132. #define TRUE NPY_TRUE
  133. #endif
  134. #ifndef FALSE
  135. #define FALSE NPY_FALSE
  136. #endif
  137. #define LONGDOUBLE_FMT NPY_LONGDOUBLE_FMT
  138. #define CONTIGUOUS NPY_CONTIGUOUS
  139. #define C_CONTIGUOUS NPY_C_CONTIGUOUS
  140. #define FORTRAN NPY_FORTRAN
  141. #define F_CONTIGUOUS NPY_F_CONTIGUOUS
  142. #define OWNDATA NPY_OWNDATA
  143. #define FORCECAST NPY_FORCECAST
  144. #define ENSURECOPY NPY_ENSURECOPY
  145. #define ENSUREARRAY NPY_ENSUREARRAY
  146. #define ELEMENTSTRIDES NPY_ELEMENTSTRIDES
  147. #define ALIGNED NPY_ALIGNED
  148. #define NOTSWAPPED NPY_NOTSWAPPED
  149. #define WRITEABLE NPY_WRITEABLE
  150. #define UPDATEIFCOPY NPY_UPDATEIFCOPY
  151. #define ARR_HAS_DESCR NPY_ARR_HAS_DESCR
  152. #define BEHAVED NPY_BEHAVED
  153. #define BEHAVED_NS NPY_BEHAVED_NS
  154. #define CARRAY NPY_CARRAY
  155. #define CARRAY_RO NPY_CARRAY_RO
  156. #define FARRAY NPY_FARRAY
  157. #define FARRAY_RO NPY_FARRAY_RO
  158. #define DEFAULT NPY_DEFAULT
  159. #define IN_ARRAY NPY_IN_ARRAY
  160. #define OUT_ARRAY NPY_OUT_ARRAY
  161. #define INOUT_ARRAY NPY_INOUT_ARRAY
  162. #define IN_FARRAY NPY_IN_FARRAY
  163. #define OUT_FARRAY NPY_OUT_FARRAY
  164. #define INOUT_FARRAY NPY_INOUT_FARRAY
  165. #define UPDATE_ALL NPY_UPDATE_ALL
  166. #define OWN_DATA NPY_OWNDATA
  167. #define BEHAVED_FLAGS NPY_BEHAVED
  168. #define BEHAVED_FLAGS_NS NPY_BEHAVED_NS
  169. #define CARRAY_FLAGS_RO NPY_CARRAY_RO
  170. #define CARRAY_FLAGS NPY_CARRAY
  171. #define FARRAY_FLAGS NPY_FARRAY
  172. #define FARRAY_FLAGS_RO NPY_FARRAY_RO
  173. #define DEFAULT_FLAGS NPY_DEFAULT
  174. #define UPDATE_ALL_FLAGS NPY_UPDATE_ALL_FLAGS
  175. #ifndef MIN
  176. #define MIN PyArray_MIN
  177. #endif
  178. #ifndef MAX
  179. #define MAX PyArray_MAX
  180. #endif
  181. #define MAX_INTP NPY_MAX_INTP
  182. #define MIN_INTP NPY_MIN_INTP
  183. #define MAX_UINTP NPY_MAX_UINTP
  184. #define INTP_FMT NPY_INTP_FMT
  185. #define REFCOUNT PyArray_REFCOUNT
  186. #define MAX_ELSIZE NPY_MAX_ELSIZE
  187. #endif