[Yt-svn] yt: 2 new changesets

hg at spacepope.org hg at spacepope.org
Thu Jul 29 17:20:01 PDT 2010


hg Repository: yt
details:   yt/rev/828a5535e899
changeset: 1896:828a5535e899
user:      Matthew Turk <matthewturk at gmail.com>
date:
Thu Jul 29 17:17:46 2010 -0700
description:
Fixed the bug in volume rendering where iv_dir[i] was always the inverse of
iv_dir[0].

hg Repository: yt
details:   yt/rev/f0960f4f6bed
changeset: 1897:f0960f4f6bed
user:      Matthew Turk <matthewturk at gmail.com>
date:
Thu Jul 29 17:18:51 2010 -0700
description:
Merging with tip

diffstat:

 yt/_amr_utils/VolumeIntegrator.pyx |     2 +-
 yt/amr_utils.c                     |  7444 ++++++++++++++++++++++++++---------------
 yt/raven/Callbacks.py              |    75 +
 3 files changed, 4737 insertions(+), 2784 deletions(-)

diffs (truncated from 13144 to 300 lines):

diff -r c9dea0de23c6 -r f0960f4f6bed yt/_amr_utils/VolumeIntegrator.pyx
--- a/yt/_amr_utils/VolumeIntegrator.pyx	Wed Jul 28 20:38:40 2010 -0700
+++ b/yt/_amr_utils/VolumeIntegrator.pyx	Thu Jul 29 17:18:51 2010 -0700
@@ -415,7 +415,7 @@
                 step[i] = 1
             x = (i+1) % 3
             y = (i+2) % 3
-            iv_dir[i] = 1.0/v_dir[0]
+            iv_dir[i] = 1.0/v_dir[i]
             tl = (self.left_edge[i] - v_pos[i])*iv_dir[i]
             temp_x = (v_pos[x] + tl*v_dir[x])
             temp_y = (v_pos[y] + tl*v_dir[y])
diff -r c9dea0de23c6 -r f0960f4f6bed yt/amr_utils.c
--- a/yt/amr_utils.c	Wed Jul 28 20:38:40 2010 -0700
+++ b/yt/amr_utils.c	Thu Jul 29 17:18:51 2010 -0700
@@ -1,18 +1,39 @@
-/* Generated by Cython 0.12.1 on Mon Jul 19 22:35:35 2010 */
+/* Generated by Cython 0.13.beta0 on Thu Jul 29 17:17:22 2010 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
-#include "structmember.h"
 #ifndef Py_PYTHON_H
     #error Python headers needed to compile C extensions, please install development version of Python.
 #else
 
+#include <stddef.h> /* For offsetof */
+#ifndef offsetof
+#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+  #ifndef __stdcall
+    #define __stdcall
+  #endif
+  #ifndef __cdecl
+    #define __cdecl
+  #endif
+  #ifndef __fastcall
+    #define __fastcall
+  #endif
+#endif
+
+#ifndef DL_IMPORT
+  #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+  #define DL_EXPORT(t) t
+#endif
+
 #ifndef PY_LONG_LONG
   #define PY_LONG_LONG LONG_LONG
 #endif
-#ifndef DL_EXPORT
-  #define DL_EXPORT(t) t
-#endif
+
 #if PY_VERSION_HEX < 0x02040000
   #define METH_COEXIST 0
   #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
@@ -82,11 +103,35 @@
 
 #if PY_MAJOR_VERSION >= 3
   #define PyBaseString_Type            PyUnicode_Type
+  #define PyStringObject               PyUnicodeObject
   #define PyString_Type                PyUnicode_Type
+  #define PyString_Check               PyUnicode_Check
   #define PyString_CheckExact          PyUnicode_CheckExact
-#else
+#endif
+
+#if PY_VERSION_HEX < 0x02060000
+  #define PyBytesObject                PyStringObject
   #define PyBytes_Type                 PyString_Type
+  #define PyBytes_Check                PyString_Check
   #define PyBytes_CheckExact           PyString_CheckExact
+  #define PyBytes_FromString           PyString_FromString
+  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
+  #define PyBytes_FromFormat           PyString_FromFormat
+  #define PyBytes_DecodeEscape         PyString_DecodeEscape
+  #define PyBytes_AsString             PyString_AsString
+  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
+  #define PyBytes_Size                 PyString_Size
+  #define PyBytes_AS_STRING            PyString_AS_STRING
+  #define PyBytes_GET_SIZE             PyString_GET_SIZE
+  #define PyBytes_Repr                 PyString_Repr
+  #define PyBytes_Concat               PyString_Concat
+  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
+  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
+  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
+#endif
+
+#ifndef PySet_CheckExact
+#  define PySet_CheckExact(obj)          (Py_TYPE(obj) == &PySet_Type)
 #endif
 
 #if PY_MAJOR_VERSION >= 3
@@ -103,30 +148,18 @@
   #define PyInt_AsSsize_t              PyLong_AsSsize_t
   #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
   #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+#endif
+
+#if PY_MAJOR_VERSION >= 3
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
 #else
   #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
   #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
-
 #endif
 
 #if PY_MAJOR_VERSION >= 3
-  #define PyMethod_New(func, self, klass) PyInstanceMethod_New(func)
-#endif
-
-#if !defined(WIN32) && !defined(MS_WINDOWS)
-  #ifndef __stdcall
-    #define __stdcall
-  #endif
-  #ifndef __cdecl
-    #define __cdecl
-  #endif
-  #ifndef __fastcall
-    #define __fastcall
-  #endif
-#else
-  #define _USE_MATH_DEFINES
+  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
 #endif
 
 #if PY_VERSION_HEX < 0x02050000
@@ -146,115 +179,66 @@
   #define __Pyx_NAMESTR(n) (n)
   #define __Pyx_DOCSTR(n)  (n)
 #endif
+
 #ifdef __cplusplus
 #define __PYX_EXTERN_C extern "C"
 #else
 #define __PYX_EXTERN_C extern
 #endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+#define _USE_MATH_DEFINES
+#endif
 #include <math.h>
 #define __PYX_HAVE_API__yt__amr_utils
+#include "stdio.h"
 #include "stdlib.h"
-#include "stdio.h"
 #include "numpy/arrayobject.h"
 #include "numpy/ufuncobject.h"
 #include "math.h"
 #include "FixedInterpolator.h"
 #include "png.h"
 
+/* inline attribute */
 #ifndef CYTHON_INLINE
   #if defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
+  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+    #define CYTHON_INLINE inline
   #else
     #define CYTHON_INLINE 
   #endif
 #endif
 
+/* unused attribute */
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__)) 
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || defined(__INTEL_COMPILER)
+#   define CYTHON_UNUSED __attribute__ ((__unused__)) 
+# else
+#   define CYTHON_UNUSED 
+# endif
+#endif
+
 typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
 
 
 /* Type Conversion Predeclarations */
 
-#if PY_MAJOR_VERSION < 3
-#define __Pyx_PyBytes_FromString          PyString_FromString
-#define __Pyx_PyBytes_FromStringAndSize   PyString_FromStringAndSize
-#define __Pyx_PyBytes_AsString            PyString_AsString
-#else
-#define __Pyx_PyBytes_FromString          PyBytes_FromString
-#define __Pyx_PyBytes_FromStringAndSize   PyBytes_FromStringAndSize
-#define __Pyx_PyBytes_AsString            PyBytes_AsString
-#endif
-
-#define __Pyx_PyBytes_FromUString(s)      __Pyx_PyBytes_FromString((char*)s)
-#define __Pyx_PyBytes_AsUString(s)        ((unsigned char*) __Pyx_PyBytes_AsString(s))
+#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
+#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))
 
 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
 
-#if !defined(T_PYSSIZET)
-#if PY_VERSION_HEX < 0x02050000
-#define T_PYSSIZET T_INT
-#elif !defined(T_LONGLONG)
-#define T_PYSSIZET \
-        ((sizeof(Py_ssize_t) == sizeof(int))  ? T_INT  : \
-        ((sizeof(Py_ssize_t) == sizeof(long)) ? T_LONG : -1))
-#else
-#define T_PYSSIZET \
-        ((sizeof(Py_ssize_t) == sizeof(int))          ? T_INT      : \
-        ((sizeof(Py_ssize_t) == sizeof(long))         ? T_LONG     : \
-        ((sizeof(Py_ssize_t) == sizeof(PY_LONG_LONG)) ? T_LONGLONG : -1)))
-#endif
-#endif
-
-
-#if !defined(T_ULONGLONG)
-#define __Pyx_T_UNSIGNED_INT(x) \
-        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
-        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
-        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
-        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : -1))))
-#else
-#define __Pyx_T_UNSIGNED_INT(x) \
-        ((sizeof(x) == sizeof(unsigned char))  ? T_UBYTE : \
-        ((sizeof(x) == sizeof(unsigned short)) ? T_USHORT : \
-        ((sizeof(x) == sizeof(unsigned int))   ? T_UINT : \
-        ((sizeof(x) == sizeof(unsigned long))  ? T_ULONG : \
-        ((sizeof(x) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))))
-#endif
-#if !defined(T_LONGLONG)
-#define __Pyx_T_SIGNED_INT(x) \
-        ((sizeof(x) == sizeof(char))  ? T_BYTE : \
-        ((sizeof(x) == sizeof(short)) ? T_SHORT : \
-        ((sizeof(x) == sizeof(int))   ? T_INT : \
-        ((sizeof(x) == sizeof(long))  ? T_LONG : -1))))
-#else
-#define __Pyx_T_SIGNED_INT(x) \
-        ((sizeof(x) == sizeof(char))  ? T_BYTE : \
-        ((sizeof(x) == sizeof(short)) ? T_SHORT : \
-        ((sizeof(x) == sizeof(int))   ? T_INT : \
-        ((sizeof(x) == sizeof(long))  ? T_LONG : \
-        ((sizeof(x) == sizeof(PY_LONG_LONG))   ? T_LONGLONG : -1)))))
-#endif
-
-#define __Pyx_T_FLOATING(x) \
-        ((sizeof(x) == sizeof(float)) ? T_FLOAT : \
-        ((sizeof(x) == sizeof(double)) ? T_DOUBLE : -1))
-
-#if !defined(T_SIZET)
-#if !defined(T_ULONGLONG)
-#define T_SIZET \
-        ((sizeof(size_t) == sizeof(unsigned int))  ? T_UINT  : \
-        ((sizeof(size_t) == sizeof(unsigned long)) ? T_ULONG : -1))
-#else
-#define T_SIZET \
-        ((sizeof(size_t) == sizeof(unsigned int))          ? T_UINT      : \
-        ((sizeof(size_t) == sizeof(unsigned long))         ? T_ULONG     : \
-        ((sizeof(size_t) == sizeof(unsigned PY_LONG_LONG)) ? T_ULONGLONG : -1)))
-#endif
-#endif
-
 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
@@ -264,7 +248,7 @@
 
 #ifdef __GNUC__
 /* Test for GCC > 2.95 */
-#if __GNUC__ > 2 ||               (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
+#if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) 
 #define likely(x)   __builtin_expect(!!(x), 1)
 #define unlikely(x) __builtin_expect(!!(x), 0)
 #else /* __GNUC__ > 2 ... */
@@ -284,7 +268,6 @@
 static int __pyx_clineno = 0;
 static const char * __pyx_cfilenm= __FILE__;
 static const char *__pyx_filename;
-static const char **__pyx_f;
 
 
 #if !defined(CYTHON_CCOMPLEX)
@@ -310,6 +293,21 @@
   #define _Complex_I 1.0fj
 #endif
 
+static const char *__pyx_f[] = {
+  "DepthFirstOctree.pyx",
+  "PointsInVolume.pyx",
+  "VolumeIntegrator.pyx",
+  "Interpolators.pyx",



More information about the yt-svn mailing list