10000 Array params from object by mwiebe · Pull Request #39 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

Array params from object #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
3 commits merged into from
Feb 8, 2011
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
F 10000 ailed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
BUG: iter: The wrong stride was specialized in some cases for reducti…
…on operands
  • Loading branch information
mwiebe committed Feb 7, 2011
commit b8921fcae1a6a9d56a477e833f78a81ffa3b1d5e
9 changes: 7 additions & 2 deletions numpy/core/src/multiarray/lowlevel_strided_loops.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@

#include "lowlevel_strided_loops.h"

/* x86 platform works with unaligned reads and writes */
/*
* x86 platform may work with unaligned access, except when the
* compiler uses aligned SSE instructions, which gcc does in some
* cases. This is disabled for the time being.
*/
#if (defined(NPY_CPU_X86) || defined(NPY_CPU_AMD64))
# define NPY_USE_UNALIGNED_ACCESS 0 /*1*/
# define NPY_USE_UNALIGNED_ACCESS 0
#else
# define NPY_USE_UNALIGNED_ACCESS 0
#endif
Expand Down Expand Up @@ -199,6 +203,7 @@ static void
temp1 = _NPY_SWAP8(*((npy_uint64 *)src + 1));
# endif
#endif

while (N > 0) {
#if @elsize@ != 16
*((@type@ *)dst) = temp;
Expand Down
7 changes: 6 additions & 1 deletion numpy/core/src/multiarray/new_iterator.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -4905,7 +4905,12 @@ npyiter_allocate_transfer_functions(NpyIter *iter)

for (iiter = 0; iiter < niter; ++iiter) {
char flags = op_itflags[iiter];
op_stride = strides[iiter];
/*
* Reduction operands may be buffered with a different stride,
* so we must pass NPY_MAX_INTP to the transfer function factory.
*/
op_stride = (flags&NPY_OP_ITFLAG_REDUCE) ? NPY_MAX_INTP :
strides[iiter];

/*
* If we have determined that a buffer may be needed,
Expand Down
0