diff options
| author | serge-sans-paille <serge.guelton@telecom-bretagne.eu> | 2021-08-19 09:28:09 +0200 |
|---|---|---|
| committer | serge-sans-paille <serge.guelton@telecom-bretagne.eu> | 2021-10-22 11:57:28 +0200 |
| commit | 2ae7aeb3aa909b1a16bc58fd0e40dc4476dff35d (patch) | |
| tree | 401ac37d2b7e9f274c80144a09154bac42a0d417 /numpy/core/src/npymath | |
| parent | d8653001e5342d002b133dce999286fcafbd8bf0 (diff) | |
| download | numpy-2ae7aeb3aa909b1a16bc58fd0e40dc4476dff35d.tar.gz | |
[demo] how-to replacing numpy custom generation engine by raw C++
This is just a technical prototype to measure and discuss the impact and
implication of moving to C++ for kernel code generation.
Diffstat (limited to 'numpy/core/src/npymath')
| -rw-r--r-- | numpy/core/src/npymath/npy_math_private.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/src/npymath/npy_math_private.h b/numpy/core/src/npymath/npy_math_private.h index 212d11a0b..d475919b0 100644 --- a/numpy/core/src/npymath/npy_math_private.h +++ b/numpy/core/src/npymath/npy_math_private.h @@ -507,17 +507,29 @@ typedef union { #else /* !_MSC_VER */ typedef union { npy_cdouble npy_z; +#ifdef __cplusplus + std::complex<double> c99z; +#else complex double c99_z; +#endif } __npy_cdouble_to_c99_cast; typedef union { npy_cfloat npy_z; +#ifdef __cplusplus + std::complex<float> c99z; +#else complex float c99_z; +#endif } __npy_cfloat_to_c99_cast; typedef union { npy_clongdouble npy_z; +#ifdef __cplusplus + std::complex<long double> c99_z; +#else complex long double c99_z; +#endif } __npy_clongdouble_to_c99_cast; #endif /* !_MSC_VER */ |
