diff options
| author | ZHANG NA <zhangna@loongson.cn> | 2021-07-20 14:44:30 +0800 |
|---|---|---|
| committer | ZHANG NA <zhangna@loongson.cn> | 2021-07-20 14:44:30 +0800 |
| commit | 640d68ac8593be4006ea1e63f0354d7b07767541 (patch) | |
| tree | 2d1aa04dd024134a4a52f91e6dfe11eb3ccd7013 /numpy | |
| parent | 3cec3ae80e626952a6b61a72516713217d99fefe (diff) | |
| download | numpy-640d68ac8593be4006ea1e63f0354d7b07767541.tar.gz | |
BLD: Add LoongArch support
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/include/numpy/npy_cpu.h | 3 | ||||
| -rw-r--r-- | numpy/core/include/numpy/npy_endian.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/numpy/core/include/numpy/npy_cpu.h b/numpy/core/include/numpy/npy_cpu.h index 065176ac5..c39aca400 100644 --- a/numpy/core/include/numpy/npy_cpu.h +++ b/numpy/core/include/numpy/npy_cpu.h @@ -18,6 +18,7 @@ * NPY_CPU_ARCEL * NPY_CPU_ARCEB * NPY_CPU_RISCV64 + * NPY_CPU_LOONGARCH * NPY_CPU_WASM */ #ifndef _NPY_CPUARCH_H_ @@ -102,6 +103,8 @@ #define NPY_CPU_ARCEB #elif defined(__riscv) && defined(__riscv_xlen) && __riscv_xlen == 64 #define NPY_CPU_RISCV64 +#elif defined(__loongarch__) + #define NPY_CPU_LOONGARCH #elif defined(__EMSCRIPTEN__) /* __EMSCRIPTEN__ is defined by emscripten: an LLVM-to-Web compiler */ #define NPY_CPU_WASM diff --git a/numpy/core/include/numpy/npy_endian.h b/numpy/core/include/numpy/npy_endian.h index aa367a002..620595bec 100644 --- a/numpy/core/include/numpy/npy_endian.h +++ b/numpy/core/include/numpy/npy_endian.h @@ -49,6 +49,7 @@ || defined(NPY_CPU_PPC64LE) \ || defined(NPY_CPU_ARCEL) \ || defined(NPY_CPU_RISCV64) \ + || defined(NPY_CPU_LOONGARCH) \ || defined(NPY_CPU_WASM) #define NPY_BYTE_ORDER NPY_LITTLE_ENDIAN #elif defined(NPY_CPU_PPC) \ |
