Skip to content

Commit

Permalink
Improved alteration of code depending on compiler.
Browse files Browse the repository at this point in the history
  • Loading branch information
droodev committed Nov 9, 2024
1 parent d8d96eb commit 5fee205
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/npy_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
(x1) * PyArray_STRIDES(submatrix)[1])))
#define SM_shape(x0) (int) PyArray_DIM(submatrix, x0)

#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
static const npy_complex128 complex_one = {1.0f, 0.0f};
static const npy_complex128 complex_zero = {1.0f, 0.0f};
#else /* !defined(_MSC_VER) || defined(__INTEL_COMPILER) */
static const npy_complex128 complex_one = 1 + 0 * I;
static const npy_complex128 complex_zero = 0 + 0 * I;
#if defined(_MSC_VER)
static const npy_complex128 complex_one = {1.0f, 0.0f};
static const npy_complex128 complex_zero = {1.0f, 0.0f};
#else /* !defined(_MSC_VER) */
static const npy_complex128 complex_one = 1 + 0 * I;
static const npy_complex128 complex_zero = 0 + 0 * I;
#endif

// Complex numbers
Expand Down

0 comments on commit 5fee205

Please sign in to comment.