- changed milestone to 1.6
Investigate runtime savings of simplifying the code we swig when jitting ufc forms
If we can get away with generating a factory function for a ufc::form and just swigging a header with the signature, and hiding all the generated code in a .cpp file, we might be able to reduce the overhead of the jit compilation significantly. This should of course be investigated before doing surgery on ffc.
I.e. we can generate
// form_<hashvalue>.h
#include <ufc.h>
ufc::form * create_form_<hashvalue>();
// form_<hashvalue>.cpp
#include "form_<hashvalue>.h"
... regular generated ufc code
class form_<hashvalue>: public ufc::form
{ ... };
ufc::form * create_form_<hashvalue>()
{
return new form_<hashvalue>();
}
Comments (8)
-
-
reporter We could possibly even avoid swig altogether for this simplified generated code by returning a void* and using ctypes.
// form_<hashvalue>.h void * create_form_<hashvalue>(); // form_<hashvalue>.cpp #include <ufc.h> #include "form_<hashvalue>.h" ... regular generated ufc code class form_<hashvalue>: public ufc::form { ... }; void * create_form_<hashvalue>() { return new form_<hashvalue>(); }
-
reporter - changed milestone to 1.7
-
I think we should remove the FFC SWIG dependency, and use ctypes.
-
reporter I implemented a ctypes based instant replacement a week ago. It's in a private sandbox repo, I'll clean it up and publish it soon. It also has some mpi awareness with mpi4py.
-
reporter -
assigned issue to
-
assigned issue to
-
reporter - changed status to resolved
Investigation is done. This is definitely valuable, and other issues for doing the work has been created.
-
- removed milestone
Removing milestone: 1.7 (automated comment)
- Log in to comment