diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2017-06-28 22:45:38 -0400 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2018-09-27 15:43:54 -0400 |
commit | 1252b80c8183c281a6fd790d620db23e57291ade (patch) | |
tree | 1220c0e173ca0c01daff14335b54ac3f073e5199 /numpy/core/src/common | |
parent | 27d4ce926b7166c9e7fe88f7b64f8636cb464ee3 (diff) | |
download | numpy-1252b80c8183c281a6fd790d620db23e57291ade.tar.gz |
ENH: Make copy-code-paths check for uint-alignment
Diffstat (limited to 'numpy/core/src/common')
-rw-r--r-- | numpy/core/src/common/lowlevel_strided_loops.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/numpy/core/src/common/lowlevel_strided_loops.h b/numpy/core/src/common/lowlevel_strided_loops.h index f9c671f77..5f139cffb 100644 --- a/numpy/core/src/common/lowlevel_strided_loops.h +++ b/numpy/core/src/common/lowlevel_strided_loops.h @@ -7,7 +7,9 @@ /* * NOTE: This API should remain private for the time being, to allow * for further refinement. I think the 'aligned' mechanism - * needs changing, for example. + * needs changing, for example. + * + * Note: Updated in 2018 to distinguish "true" from "uint" alignment. */ /* @@ -69,8 +71,9 @@ typedef void (PyArray_StridedBinaryOp)(char *dst, npy_intp dst_stride, * strided memory. Returns NULL if there is a problem with the inputs. * * aligned: - * Should be 1 if the src and dst pointers are always aligned, - * 0 otherwise. + * Should be 1 if the src and dst pointers always point to + * locations at which a uint of equal size to dtype->elsize + * would be aligned, 0 otherwise. * src_stride: * Should be the src stride if it will always be the same, * NPY_MAX_INTP otherwise. @@ -165,8 +168,9 @@ PyArray_GetDTypeCopySwapFn(int aligned, * function when the transfer function is no longer required. * * aligned: - * Should be 1 if the src and dst pointers are always aligned, - * 0 otherwise. + * Should be 1 if the src and dst pointers always point to + * locations at which a uint of equal size to dtype->elsize + * would be aligned, 0 otherwise. * src_stride: * Should be the src stride if it will always be the same, * NPY_MAX_INTP otherwise. |