Skip to content

Commit

Permalink
BLD: keep VC compiler happy by moving the threading macros after vari…
Browse files Browse the repository at this point in the history
…able definition
  • Loading branch information
87 authored and charris committed Aug 27, 2011
1 parent e5b2073 commit 6d72420
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions numpy/core/src/multiarray/array_assign_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ raw_array_assign_array(int ndim, npy_intp *shape,
npy_intp dst_strides_it[NPY_MAXDIMS];
npy_intp src_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_StridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
int aligned, needs_api = 0;
npy_intp src_itemsize = src_dtype->elsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim,
dst_data, dst_strides, dst_dtype->alignment) &&
Expand Down Expand Up @@ -128,13 +129,14 @@ raw_array_wheremasked_assign_array(int ndim, npy_intp *shape,
npy_intp src_strides_it[NPY_MAXDIMS];
npy_intp wheremask_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_MaskedStridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
int aligned, needs_api = 0;
npy_intp src_itemsize = src_dtype->elsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim,
dst_data, dst_strides, dst_dtype->alignment) &&
Expand Down Expand Up @@ -226,7 +228,6 @@ raw_array_wheremasked_assign_array_preservena(int ndim, npy_intp *shape,
npy_intp maskna_strides_it[NPY_MAXDIMS];
npy_intp wheremask_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_MaskedStridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
Expand All @@ -239,6 +240,8 @@ raw_array_wheremasked_assign_array_preservena(int ndim, npy_intp *shape,
char *maskna_buffer;
npy_intp maskna_itemsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim,
dst_data, dst_strides, dst_dtype->alignment) &&
Expand Down
9 changes: 6 additions & 3 deletions numpy/core/src/multiarray/array_assign_scalar.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ raw_array_assign_scalar(int ndim, npy_intp *shape,
int idim;
npy_intp shape_it[NPY_MAXDIMS], dst_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_StridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
int aligned, needs_api = 0;
npy_intp src_itemsize = src_dtype->elsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim, dst_data, dst_strides,
dst_dtype->alignment);
Expand Down Expand Up @@ -108,13 +109,14 @@ raw_array_wheremasked_assign_scalar(int ndim, npy_intp *shape,
npy_intp shape_it[NPY_MAXDIMS], dst_strides_it[NPY_MAXDIMS];
npy_intp wheremask_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_MaskedStridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
int aligned, needs_api = 0;
npy_intp src_itemsize = src_dtype->elsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim, dst_data, dst_strides,
dst_dtype->alignment);
Expand Down Expand Up @@ -186,7 +188,6 @@ raw_array_wheremasked_assign_scalar_preservena(int ndim, npy_intp *shape,
npy_intp maskna_strides_it[NPY_MAXDIMS];
npy_intp wheremask_strides_it[NPY_MAXDIMS];
npy_intp coord[NPY_MAXDIMS];
NPY_BEGIN_THREADS_DEF;

PyArray_MaskedStridedUnaryOp *stransfer = NULL;
NpyAuxData *transferdata = NULL;
Expand All @@ -199,6 +200,8 @@ raw_array_wheremasked_assign_scalar_preservena(int ndim, npy_intp *shape,
char *maskna_buffer;
npy_intp maskna_itemsize;

NPY_BEGIN_THREADS_DEF;

/* Check alignment */
aligned = raw_array_is_aligned(ndim, dst_data, dst_strides,
dst_dtype->alignment);
Expand Down

0 comments on commit 6d72420

Please sign in to comment.