From 8081338dbaa20fd2f5a073969ab658d9f398e196 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 20 Apr 2008 00:45:27 +0000 Subject: Cleanup code style in generic ufunc loops. --- numpy/core/src/ufuncobject.c | 423 ++++++++++++++++++++++++++++--------------- 1 file changed, 278 insertions(+), 145 deletions(-) (limited to 'numpy/core/src') diff --git a/numpy/core/src/ufuncobject.c b/numpy/core/src/ufuncobject.c index 0123b6f5e..78700214c 100644 --- a/numpy/core/src/ufuncobject.c +++ b/numpy/core/src/ufuncobject.c @@ -1,28 +1,28 @@ /* - Python Universal Functions Object -- Math for all types, plus fast - arrays math - - Full description - - This supports mathematical (and Boolean) functions on arrays and other python - objects. Math on large arrays of basic C types is rather efficient. - - Travis E. Oliphant 2005, 2006 oliphant@ee.byu.edu (oliphant.travis@ieee.org) - Brigham Young University - - based on the - - Original Implementation: - Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu - - with inspiration and code from - Numarray - Space Science Telescope Institute - J. Todd Miller - Perry Greenfield - Rick White - -*/ + * Python Universal Functions Object -- Math for all types, plus fast + * arrays math + * + * Full description + * + * This supports mathematical (and Boolean) functions on arrays and other python + * objects. Math on large arrays of basic C types is rather efficient. + * + * Travis E. Oliphant 2005, 2006 oliphant@ee.byu.edu (oliphant.travis@ieee.org) + * Brigham Young University + * + * based on the + * + * Original Implementation: + * Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu + * + * with inspiration and code from + * Numarray + * Space Science Telescope Institute + * J. Todd Miller + * Perry Greenfield + * Rick White + * + */ typedef double (DoubleBinaryFunc)(double x, double y); @@ -40,12 +40,17 @@ typedef void (ClongdoubleBinaryFunc)(clongdouble *x, clongdouble *y, \ static void PyUFunc_ff_f_As_dd_d(char **args, intp *dimensions, intp *steps, void *func) { - register intp i, n=dimensions[0]; - register intp is1=steps[0],is2=steps[1],os=steps[2]; - char *ip1=args[0], *ip2=args[1], *op=args[2]; + intp n = dimensions[0]; + intp is1 = steps[0]; + intp is2 = steps[1]; + intp os = steps[2]; + char *ip1 = args[0]; + char *ip2 = args[1]; + char *op = args[2]; + intp i; - for(i=0; i