diff options
| author | Ralf Gommers <ralf.gommers@gmail.com> | 2022-11-25 10:04:49 +0100 |
|---|---|---|
| committer | Ralf Gommers <ralf.gommers@gmail.com> | 2022-11-25 10:51:14 +0100 |
| commit | 3947b1a023a07a55522de65b4d302339bac2bad7 (patch) | |
| tree | 122f77e3c0232cff07c53d82bd98db4427362932 /numpy/random/include | |
| parent | 145b5a76b00a24aa458f2374990eb294496b2665 (diff) | |
| download | numpy-3947b1a023a07a55522de65b4d302339bac2bad7.tar.gz | |
MAINT: replace `NPY_INLINE` with `inline`
Closes gh-22100
Diffstat (limited to 'numpy/random/include')
| -rw-r--r-- | numpy/random/include/aligned_malloc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/random/include/aligned_malloc.h b/numpy/random/include/aligned_malloc.h index 43f68253d..0fff57b6c 100644 --- a/numpy/random/include/aligned_malloc.h +++ b/numpy/random/include/aligned_malloc.h @@ -6,7 +6,7 @@ #define NPY_MEMALIGN 16 /* 16 for SSE2, 32 for AVX, 64 for Xeon Phi */ -static NPY_INLINE void *PyArray_realloc_aligned(void *p, size_t n) +static inline void *PyArray_realloc_aligned(void *p, size_t n) { void *p1, **p2, *base; size_t old_offs, offs = NPY_MEMALIGN - 1 + sizeof(void *); @@ -31,12 +31,12 @@ static NPY_INLINE void *PyArray_realloc_aligned(void *p, size_t n) return (void *)p2; } -static NPY_INLINE void *PyArray_malloc_aligned(size_t n) +static inline void *PyArray_malloc_aligned(size_t n) { return PyArray_realloc_aligned(NULL, n); } -static NPY_INLINE void *PyArray_calloc_aligned(size_t n, size_t s) +static inline void *PyArray_calloc_aligned(size_t n, size_t s) { void *p; if (NPY_UNLIKELY((p = PyArray_realloc_aligned(NULL, n * s)) == NULL)) @@ -45,7 +45,7 @@ static NPY_INLINE void *PyArray_calloc_aligned(size_t n, size_t s) return p; } -static NPY_INLINE void PyArray_free_aligned(void *p) +static inline void PyArray_free_aligned(void *p) { void *base = *(((void **)p) - 1); PyMem_Free(base); |
