[Numpy-svn] r6190 - branches/dynamic_cpu_configuration/numpy/core/include/numpy

numpy-svn@scip... numpy-svn@scip...
Mon Dec 22 21:52:01 CST 2008


Author: cdavid
Date: 2008-12-22 21:51:56 -0600 (Mon, 22 Dec 2008)
New Revision: 6190

Modified:
   branches/dynamic_cpu_configuration/numpy/core/include/numpy/cpuarch.h
   branches/dynamic_cpu_configuration/numpy/core/include/numpy/npy_endian.h
Log:
Fix cpuarch.h macros.

Modified: branches/dynamic_cpu_configuration/numpy/core/include/numpy/cpuarch.h
===================================================================
--- branches/dynamic_cpu_configuration/numpy/core/include/numpy/cpuarch.h	2008-12-23 03:51:39 UTC (rev 6189)
+++ branches/dynamic_cpu_configuration/numpy/core/include/numpy/cpuarch.h	2008-12-23 03:51:56 UTC (rev 6190)
@@ -1,12 +1,5 @@
 /*
  * This set (target) cpu specific macros:
- *      - NPY_TARGET_CPU: target CPU type. Possible values:
- *              NPY_X86
- *              NPY_AMD64
- *              NPY_PPC
- *              NPY_SPARC
- *              NPY_S390
- *              NPY_PA_RISC
  */
 #ifndef _NPY_CPUARCH_H_
 #define _NPY_CPUARCH_H_
@@ -14,22 +7,22 @@
 #if defined ( _i386_ ) || defined( __i386__ )
         /* __i386__ is defined by gcc and Intel compiler on Linux, _i386_ by
         VS compiler */
-        #define NPY_TARGET_CPU NPY_X86
+        #define NPY_TARGET_CPU_X86
 #elif defined(__x86_64__) || defined(__amd64__)
         /* both __x86_64__ and __amd64__ are defined by gcc */
-        #define NPY_TARGET_CPU NPY_AMD64
+        #define NPY_TARGET_CPU_AMD64
 #elif defined(__ppc__) || defined(__powerpc__)
         /* __ppc__ is defined by gcc, I remember having seen __powerpc__ once,
          * but can't find it ATM */
-        #define NPY_TARGET_CPU NPY_PPC
+        #define NPY_TARGET_CPU_PPC
 #elif defined(__sparc__) || defined(__sparc)
         /* __sparc__ is defined by gcc and Forte (e.g. Sun) compilers */
-        #define NPY_TARGET_CPU NPY_SPARC
+        #define NPY_TARGET_CPU_SPARC
 #elif defined(__s390__)
-        #define NPY_TARGET_CPU NPY_S390
+        #define NPY_TARGET_CPU_S390
 #elif defined(__parisc__)
         /* XXX: Not sure about this one... */
-        #define NPY_TARGET_CPU NPY_PA_RISC
+        #define NPY_TARGET_CPU_PA_RISC
 #else
         #error Unknown CPU, please report this to numpy maintainers with \
         information about your platform

Modified: branches/dynamic_cpu_configuration/numpy/core/include/numpy/npy_endian.h
===================================================================
--- branches/dynamic_cpu_configuration/numpy/core/include/numpy/npy_endian.h	2008-12-23 03:51:39 UTC (rev 6189)
+++ branches/dynamic_cpu_configuration/numpy/core/include/numpy/npy_endian.h	2008-12-23 03:51:56 UTC (rev 6190)
@@ -18,12 +18,12 @@
 #else
         /* Set endianness info using target CPU */
         #include "cpuarch.h"
-        
-        #if defined(NPY_X86) || defined(NPY_AMD64)
+
+        #if defined(NPY_TARGET_CPU_X86) || defined(NPY_TARGET_CPU_AMD64)
                         #define NPY_LITTLE_ENDIAN
                         #define NPY_BYTE_ORDER 1234
-        #elif defined(NPY_PPC) || defined(NPY_SPARC) || defined(NPY_S390) || \
-              defined(NPY_PA_RISC)
+        #elif defined(NPY_TARGET_CPU_PPC) || defined(NPY_TARGET_CPU_SPARC) || \
+              defined(NPY_TARGET_CPU_S390) || defined(NPY_TARGET_CPU_PA_RISC)
                         #define NPY_BIG_ENDIAN
                         #define NPY_BYTE_ORDER 4321
         #endif



More information about the Numpy-svn mailing list