numpy
2.0.0
|
#include "Python.h"
#include "structmember.h"
#include <numpy/arrayobject.h>
#include <numpy/npy_cpu.h>
#include <numpy/halffloat.h>
#include "lowlevel_strided_loops.h"
#define _MULTIARRAYMODULE |
#define _NPY_NOP1 | ( | x | ) | (x) |
#define _NPY_NOP2 | ( | x | ) | (x) |
#define _NPY_NOP4 | ( | x | ) | (x) |
#define _NPY_NOP8 | ( | x | ) | (x) |
#define _NPY_SWAP2 | ( | x | ) | npy_bswap2(x) |
#define _NPY_SWAP4 | ( | x | ) | npy_bswap4(x) |
#define _NPY_SWAP8 | ( | x | ) | npy_bswap8(x) |
#define _NPY_SWAP_INPLACE16 | ( | x | ) |
{ \ char a = (x)[0]; (x)[0] = (x)[15]; (x)[15] = a; \ a = (x)[1]; (x)[1] = (x)[14]; (x)[14] = a; \ a = (x)[2]; (x)[2] = (x)[13]; (x)[13] = a; \ a = (x)[3]; (x)[3] = (x)[12]; (x)[12] = a; \ a = (x)[4]; (x)[4] = (x)[11]; (x)[11] = a; \ a = (x)[5]; (x)[5] = (x)[10]; (x)[10] = a; \ a = (x)[6]; (x)[6] = (x)[9]; (x)[9] = a; \ a = (x)[7]; (x)[7] = (x)[8]; (x)[8] = a; \ }
#define _NPY_SWAP_INPLACE2 | ( | x | ) | npy_bswap2_unaligned(x) |
#define _NPY_SWAP_INPLACE4 | ( | x | ) | npy_bswap4_unaligned(x) |
#define _NPY_SWAP_INPLACE8 | ( | x | ) | npy_bswap8_unaligned(x) |
#define _NPY_SWAP_PAIR4 | ( | x | ) |
(((((npy_uint32)x)&0xffu) << 8) | \ ((((npy_uint32)x)&0xff00u) >> 8) | \ ((((npy_uint32)x)&0xff0000u) << 8) | \ ((((npy_uint32)x)&0xff000000u) >> 8))
#define _NPY_SWAP_PAIR8 | ( | x | ) |
(((((npy_uint64)x)&0xffULL) << 24) | \ ((((npy_uint64)x)&0xff00ULL) << 8) | \ ((((npy_uint64)x)&0xff0000ULL) >> 8) | \ ((((npy_uint64)x)&0xff000000ULL) >> 24) | \ ((((npy_uint64)x)&0xff00000000ULL) << 24) | \ ((((npy_uint64)x)&0xff0000000000ULL) << 8) | \ ((((npy_uint64)x)&0xff000000000000ULL) >> 8) | \ ((((npy_uint64)x)&0xff00000000000000ULL) >> 24))
#define NPY_NO_DEPRECATED_API NPY_API_VERSION |
#define NPY_USE_UNALIGNED_ACCESS 0 |
#define PY_SSIZE_T_CLEAN |
static void _contig_to_contig | ( | char * | dst, |
npy_intp | NPY_UNUSEDdst_stride, | ||
char * | src, | ||
npy_intp | NPY_UNUSEDsrc_stride, | ||
npy_intp | N, | ||
npy_intp | src_itemsize, | ||
NpyAuxData * | NPY_UNUSEDdata | ||
) | [static] |
Referenced by _swap_pair_strided_to_strided().
static void _strided_to_strided | ( | char * | dst, |
npy_intp | dst_stride, | ||
char * | src, | ||
npy_intp | src_stride, | ||
npy_intp | N, | ||
npy_intp | src_itemsize, | ||
NpyAuxData * | NPY_UNUSEDdata | ||
) | [static] |
#src_contig = 0, 0, 1 ,1# #dst_contig = 0, 1, 0 ,1#
#prefix = , _aligned, _swap, _aligned_swap, _swap_pair, _aligned_swap_pair# #is_aligned = 0, 1, 0, 1, 0, 1# #minelsize = 1, 1, 2, 2, 4, 4# #is_swap = 0, 0, 1, 1, 2, 2#
<
static void _swap_pair_strided_to_strided | ( | char * | dst, |
npy_intp | dst_stride, | ||
char * | src, | ||
npy_intp | src_stride, | ||
npy_intp | N, | ||
npy_intp | src_itemsize, | ||
NpyAuxData * | NPY_UNUSEDdata | ||
) | [static] |
static void _swap_strided_to_strided | ( | char * | dst, |
npy_intp | dst_stride, | ||
char * | src, | ||
npy_intp | src_stride, | ||
npy_intp | N, | ||
npy_intp | src_itemsize, | ||
NpyAuxData * | NPY_UNUSEDdata | ||
) | [static] |
NPY_NO_EXPORT PyArray_StridedUnaryOp* function | ( | int | aligned, |
npy_intp | src_stride, | ||
npy_intp | dst_stride, | ||
npy_intp | itemsize | ||
) |
<
NPY_NO_EXPORT int mapiter_trivial_ name | ( | PyArrayObject * | self, |
PyArrayObject * | ind, | ||
PyArrayObject * | result | ||
) |
<
NPY_NO_EXPORT int mapiter_ name | ( | PyArrayMapIterObject * | mit | ) |
<
<blockquote> not at all...</blockquote>
NPY_NO_EXPORT PyArray_StridedUnaryOp* PyArray_GetStridedCopyFn | ( | int | aligned, |
npy_intp | src_stride, | ||
npy_intp | dst_stride, | ||
npy_intp | itemsize | ||
) |
<
Referenced by _strided_to_strided_truncate_copy().
NPY_NO_EXPORT PyArray_StridedUnaryOp* PyArray_GetStridedNumericCastFn | ( | int | aligned, |
npy_intp | src_stride, | ||
npy_intp | dst_stride, | ||
int | src_type_num, | ||
int | dst_type_num | ||
) |
</blockquote>
</blockquote>
NPY_NO_EXPORT npy_intp PyArray_TransferMaskedStridedToNDim | ( | npy_intp | ndim, |
char * | dst, | ||
npy_intp * | dst_strides, | ||
npy_intp | dst_strides_inc, | ||
char * | src, | ||
npy_intp | src_stride, | ||
npy_uint8 * | mask, | ||
npy_intp | mask_stride, | ||
npy_intp * | coords, | ||
npy_intp | coords_inc, | ||
npy_intp * | shape, | ||
npy_intp | shape_inc, | ||
npy_intp | count, | ||
npy_intp | src_itemsize, | ||
PyArray_MaskedStridedUnaryOp * | stransfer, | ||
NpyAuxData * | data | ||
) |
References check_and_adjust_index(), NPY_AUXDATA_FREE, NPY_BEGIN_THREADS, NPY_BEGIN_THREADS_DEF, NPY_END_THREADS, and NpyIter_ResetBasePointers().
NPY_NO_EXPORT npy_intp PyArray_TransferNDimToStrided | ( | npy_intp | ndim, |
char * | dst, | ||
npy_intp | dst_stride, | ||
char * | src, | ||
npy_intp * | src_strides, | ||
npy_intp | src_strides_inc, | ||
npy_intp * | coords, | ||
npy_intp | coords_inc, | ||
npy_intp * | shape, | ||
npy_intp | shape_inc, | ||
npy_intp | count, | ||
npy_intp | src_itemsize, | ||
PyArray_StridedUnaryOp * | stransfer, | ||
NpyAuxData * | data | ||
) |
NPY_NO_EXPORT npy_intp PyArray_TransferStridedToNDim | ( | npy_intp | ndim, |
char * | dst, | ||
npy_intp * | dst_strides, | ||
npy_intp | dst_strides_inc, | ||
char * | src, | ||
npy_intp | src_stride, | ||
npy_intp * | coords, | ||
npy_intp | coords_inc, | ||
npy_intp * | shape, | ||
npy_intp | shape_inc, | ||
npy_intp | count, | ||
npy_intp | src_itemsize, | ||
PyArray_StridedUnaryOp * | stransfer, | ||
NpyAuxData * | data | ||
) |
Referenced by npyiter_allocate_buffers().