[cig-commits] r8936 - cs/benchmark/cigma/trunk/src

luis at geodynamics.org luis at geodynamics.org
Wed Dec 19 12:05:22 PST 2007


Author: luis
Date: 2007-12-19 12:05:22 -0800 (Wed, 19 Dec 2007)
New Revision: 8936

Modified:
   cs/benchmark/cigma/trunk/src/FiatProxy.h
   cs/benchmark/cigma/trunk/src/FiatProxy.py
Log:
Add test() function to FiatProxy

Modified: cs/benchmark/cigma/trunk/src/FiatProxy.h
===================================================================
--- cs/benchmark/cigma/trunk/src/FiatProxy.h	2007-12-19 20:05:15 UTC (rev 8935)
+++ cs/benchmark/cigma/trunk/src/FiatProxy.h	2007-12-19 20:05:22 UTC (rev 8936)
@@ -20,12 +20,14 @@
     void finalize();
 
 public:
+    void test(const char *msg, int n);
     void quadrature(int shape, int order, double **x, double **w, int *npts, int *dim);
     void tabulate(int npts, double *pts, double *basis, double *basisDeriv);
 
 public:
     PyObject *module;
     PyObject *module_dict;
+    PyObject *test_fn;
     PyObject *quad_fn;
     PyObject *tab_fn;
     PyArrayObject *x;

Modified: cs/benchmark/cigma/trunk/src/FiatProxy.py
===================================================================
--- cs/benchmark/cigma/trunk/src/FiatProxy.py	2007-12-19 20:05:15 UTC (rev 8935)
+++ cs/benchmark/cigma/trunk/src/FiatProxy.py	2007-12-19 20:05:22 UTC (rev 8936)
@@ -3,13 +3,18 @@
 # Wrapper functions called from FiatProxy C++ object
 #
 
-from cigma.api import quadrature as Q
-from cigma.api import tabulation as T
+from cigmalib.api import quadrature as Q
+from cigmalib.api import tabulate as T
 
+def test(msg, n):
+    for i in xrange(n):
+        print msg
+    return 42
+
 def quadrature(shape, order):
     return Q(shape, order)
 
 
-def tabulation(shape, degree, x):
+def tabulate(shape, degree, x):
     return T(shape, degree, x)
 



More information about the cig-commits mailing list