[Yt-svn] yt-commit r1167 - trunk/yt/lagos
mturk at wrangler.dreamhost.com
mturk at wrangler.dreamhost.com
Thu Feb 12 23:41:01 PST 2009
Author: mturk
Date: Thu Feb 12 23:41:00 2009
New Revision: 1167
URL: http://yt.spacepope.org/changeset/1167
Log:
Fixed a parenthesis bug, which seems to end up with a huge commit for the
generated code.
Modified:
trunk/yt/lagos/DepthFirstOctree.c
trunk/yt/lagos/DepthFirstOctree.pyx
Modified: trunk/yt/lagos/DepthFirstOctree.c
==============================================================================
--- trunk/yt/lagos/DepthFirstOctree.c (original)
+++ trunk/yt/lagos/DepthFirstOctree.c Thu Feb 12 23:41:00 2009
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.10.3 on Fri Feb 6 13:47:10 2009 */
+/* Generated by Cython 0.10.3 on Thu Feb 12 23:43:53 2009 */
#define PY_SSIZE_T_CLEAN
#include "Python.h"
@@ -1438,7 +1438,7 @@
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0] # <<<<<<<<<<<<<<
* child_leftedges = child_grid.left_edges
- * child_i = int(cx - child_leftedges[0])/child_dx
+ * child_i = int((cx - child_leftedges[0])/child_dx)
*/
__pyx_5 = __Pyx_GetItemInt(__pyx_v_child_grid->dx, 0, 0); if (!__pyx_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_3 = __pyx_PyFloat_AsDouble(__pyx_5); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -1449,8 +1449,8 @@
* child_grid = grids[ci-1]
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges # <<<<<<<<<<<<<<
- * child_i = int(cx - child_leftedges[0])/child_dx
- * child_j = int(cy - child_leftedges[1])/child_dx
+ * child_i = int((cx - child_leftedges[0])/child_dx)
+ * child_j = int((cy - child_leftedges[1])/child_dx)
*/
if (!(__Pyx_TypeTest(__pyx_v_child_grid->left_edges, __pyx_ptype_5numpy_ndarray))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_t_16 = ((PyArrayObject *)__pyx_v_child_grid->left_edges);
@@ -1477,86 +1477,74 @@
/* "/Users/matthewturk/Development/yt/trunk/yt/lagos/DepthFirstOctree.pyx":102
* child_dx = child_grid.dx[0]
* child_leftedges = child_grid.left_edges
- * child_i = int(cx - child_leftedges[0])/child_dx # <<<<<<<<<<<<<<
- * child_j = int(cy - child_leftedges[1])/child_dx
- * child_k = int(cz - child_leftedges[2])/child_dx
+ * child_i = int((cx - child_leftedges[0])/child_dx) # <<<<<<<<<<<<<<
+ * child_j = int((cy - child_leftedges[1])/child_dx)
+ * child_k = int((cz - child_leftedges[2])/child_dx)
*/
__pyx_t_21 = 0;
if (__pyx_t_21 < 0) __pyx_t_21 += __pyx_bshape_0_child_leftedges;
- __pyx_6 = PyFloat_FromDouble((__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_21, __pyx_bstride_0_child_leftedges)))); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_6 = PyFloat_FromDouble(((__pyx_v_cx - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_21, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx)); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
__pyx_6 = 0;
__pyx_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
- __pyx_5 = PyFloat_FromDouble(__pyx_v_child_dx); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_20 = __Pyx_PyNumber_Divide(__pyx_4, __pyx_5); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_7 = __pyx_PyInt_int(__pyx_4); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
Py_DECREF(__pyx_4); __pyx_4 = 0;
- Py_DECREF(__pyx_5); __pyx_5 = 0;
- __pyx_7 = __pyx_PyInt_int(__pyx_t_20); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_20); __pyx_t_20 = 0;
__pyx_v_child_i = __pyx_7;
/* "/Users/matthewturk/Development/yt/trunk/yt/lagos/DepthFirstOctree.pyx":103
* child_leftedges = child_grid.left_edges
- * child_i = int(cx - child_leftedges[0])/child_dx
- * child_j = int(cy - child_leftedges[1])/child_dx # <<<<<<<<<<<<<<
- * child_k = int(cz - child_leftedges[2])/child_dx
+ * child_i = int((cx - child_leftedges[0])/child_dx)
+ * child_j = int((cy - child_leftedges[1])/child_dx) # <<<<<<<<<<<<<<
+ * child_k = int((cz - child_leftedges[2])/child_dx)
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
*/
__pyx_t_22 = 1;
if (__pyx_t_22 < 0) __pyx_t_22 += __pyx_bshape_0_child_leftedges;
- __pyx_6 = PyFloat_FromDouble((__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_22, __pyx_bstride_0_child_leftedges)))); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
- __pyx_6 = 0;
- __pyx_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
- __pyx_5 = PyFloat_FromDouble(__pyx_v_child_dx); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_20 = __Pyx_PyNumber_Divide(__pyx_4, __pyx_5); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- Py_DECREF(__pyx_5); __pyx_5 = 0;
- __pyx_7 = __pyx_PyInt_int(__pyx_t_20); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_5 = PyFloat_FromDouble(((__pyx_v_cy - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_22, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx)); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_6 = PyTuple_New(1); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyTuple_SET_ITEM(__pyx_6, 0, __pyx_5);
+ __pyx_5 = 0;
+ __pyx_2 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_6), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ Py_DECREF(((PyObject *)__pyx_6)); __pyx_6 = 0;
+ __pyx_7 = __pyx_PyInt_int(__pyx_2); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 103; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ Py_DECREF(__pyx_2); __pyx_2 = 0;
__pyx_v_child_j = __pyx_7;
/* "/Users/matthewturk/Development/yt/trunk/yt/lagos/DepthFirstOctree.pyx":104
- * child_i = int(cx - child_leftedges[0])/child_dx
- * child_j = int(cy - child_leftedges[1])/child_dx
- * child_k = int(cz - child_leftedges[2])/child_dx # <<<<<<<<<<<<<<
+ * child_i = int((cx - child_leftedges[0])/child_dx)
+ * child_j = int((cy - child_leftedges[1])/child_dx)
+ * child_k = int((cz - child_leftedges[2])/child_dx) # <<<<<<<<<<<<<<
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, refined, grids)
*/
__pyx_t_23 = 2;
if (__pyx_t_23 < 0) __pyx_t_23 += __pyx_bshape_0_child_leftedges;
- __pyx_6 = PyFloat_FromDouble((__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_23, __pyx_bstride_0_child_leftedges)))); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_2 = PyTuple_New(1); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_2, 0, __pyx_6);
- __pyx_6 = 0;
- __pyx_4 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_2), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(((PyObject *)__pyx_2)); __pyx_2 = 0;
- __pyx_5 = PyFloat_FromDouble(__pyx_v_child_dx); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_t_20 = __Pyx_PyNumber_Divide(__pyx_4, __pyx_5); if (unlikely(!__pyx_t_20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_4); __pyx_4 = 0;
- Py_DECREF(__pyx_5); __pyx_5 = 0;
- __pyx_7 = __pyx_PyInt_int(__pyx_t_20); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ __pyx_4 = PyFloat_FromDouble(((__pyx_v_cz - (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_float64_t *, __pyx_bstruct_child_leftedges.buf, __pyx_t_23, __pyx_bstride_0_child_leftedges))) / __pyx_v_child_dx)); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_5 = PyTuple_New(1); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ PyTuple_SET_ITEM(__pyx_5, 0, __pyx_4);
+ __pyx_4 = 0;
+ __pyx_6 = PyObject_Call(((PyObject *)((PyObject*)&PyInt_Type)), ((PyObject *)__pyx_5), NULL); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ Py_DECREF(((PyObject *)__pyx_5)); __pyx_5 = 0;
+ __pyx_7 = __pyx_PyInt_int(__pyx_6); if (unlikely((__pyx_7 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ Py_DECREF(__pyx_6); __pyx_6 = 0;
__pyx_v_child_k = __pyx_7;
/* "/Users/matthewturk/Development/yt/trunk/yt/lagos/DepthFirstOctree.pyx":105
- * child_j = int(cy - child_leftedges[1])/child_dx
- * child_k = int(cz - child_leftedges[2])/child_dx
+ * child_j = int((cy - child_leftedges[1])/child_dx)
+ * child_k = int((cz - child_leftedges[2])/child_dx)
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2, # <<<<<<<<<<<<<<
* curpos, ci, output, refined, grids)
* return s
*/
- __pyx_6 = __Pyx_GetName(__pyx_m, __pyx_kp_23); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_2 = PyInt_FromLong(__pyx_v_child_i); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_4 = PyInt_FromLong(__pyx_v_child_j); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- __pyx_5 = PyInt_FromLong(__pyx_v_child_k); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_2 = __Pyx_GetName(__pyx_m, __pyx_kp_23); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_4 = PyInt_FromLong(__pyx_v_child_i); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_5 = PyInt_FromLong(__pyx_v_child_j); if (unlikely(!__pyx_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ __pyx_6 = PyInt_FromLong(__pyx_v_child_k); if (unlikely(!__pyx_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
/* "/Users/matthewturk/Development/yt/trunk/yt/lagos/DepthFirstOctree.pyx":106
- * child_k = int(cz - child_leftedges[2])/child_dx
+ * child_k = int((cz - child_leftedges[2])/child_dx)
* s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
* curpos, ci, output, refined, grids) # <<<<<<<<<<<<<<
* return s
@@ -1564,9 +1552,9 @@
*/
__pyx_10 = PyInt_FromLong(__pyx_v_ci); if (unlikely(!__pyx_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 106; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_11 = PyTuple_New(11); if (unlikely(!__pyx_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- PyTuple_SET_ITEM(__pyx_11, 0, __pyx_2);
- PyTuple_SET_ITEM(__pyx_11, 1, __pyx_4);
- PyTuple_SET_ITEM(__pyx_11, 2, __pyx_5);
+ PyTuple_SET_ITEM(__pyx_11, 0, __pyx_4);
+ PyTuple_SET_ITEM(__pyx_11, 1, __pyx_5);
+ PyTuple_SET_ITEM(__pyx_11, 2, __pyx_6);
Py_INCREF(__pyx_int_2);
PyTuple_SET_ITEM(__pyx_11, 3, __pyx_int_2);
Py_INCREF(__pyx_int_2);
@@ -1582,16 +1570,16 @@
PyTuple_SET_ITEM(__pyx_11, 9, ((PyObject *)__pyx_v_refined));
Py_INCREF(((PyObject *)__pyx_v_grids));
PyTuple_SET_ITEM(__pyx_11, 10, ((PyObject *)__pyx_v_grids));
- __pyx_2 = 0;
__pyx_4 = 0;
__pyx_5 = 0;
+ __pyx_6 = 0;
__pyx_10 = 0;
- __pyx_2 = PyObject_Call(__pyx_6, ((PyObject *)__pyx_11), NULL); if (unlikely(!__pyx_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
- Py_DECREF(__pyx_6); __pyx_6 = 0;
+ __pyx_4 = PyObject_Call(__pyx_2, ((PyObject *)__pyx_11), NULL); if (unlikely(!__pyx_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 105; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
+ Py_DECREF(__pyx_2); __pyx_2 = 0;
Py_DECREF(((PyObject *)__pyx_11)); __pyx_11 = 0;
Py_DECREF(__pyx_v_s);
- __pyx_v_s = __pyx_2;
- __pyx_2 = 0;
+ __pyx_v_s = __pyx_4;
+ __pyx_4 = 0;
}
__pyx_L12:;
}
Modified: trunk/yt/lagos/DepthFirstOctree.pyx
==============================================================================
--- trunk/yt/lagos/DepthFirstOctree.pyx (original)
+++ trunk/yt/lagos/DepthFirstOctree.pyx Thu Feb 12 23:41:00 2009
@@ -99,9 +99,9 @@
child_grid = grids[ci-1]
child_dx = child_grid.dx[0]
child_leftedges = child_grid.left_edges
- child_i = int(cx - child_leftedges[0])/child_dx
- child_j = int(cy - child_leftedges[1])/child_dx
- child_k = int(cz - child_leftedges[2])/child_dx
+ child_i = int((cx - child_leftedges[0])/child_dx)
+ child_j = int((cy - child_leftedges[1])/child_dx)
+ child_k = int((cz - child_leftedges[2])/child_dx)
s = RecurseOctreeDepthFirst(child_i, child_j, child_k, 2, 2, 2,
curpos, ci, output, refined, grids)
return s
More information about the yt-svn
mailing list