2009/3/23 Garth N. Wells <[email protected]>: > > > A Navaei wrote: >> >> 2009/3/23 Garth N. Wells <[email protected]>: >>> >>> A Navaei wrote: >>>> >>>> The success of MTL4 based on generic meta-programming, arises the >>>> question about re-visiting the efficiency of code-generation >>>> approaches, including FFC. Given that FEM can particularly benefit >>>> from major meta-programming characteristics, namely static >>>> polymorphism and loop unrolling, MTL4 demonstrates that the >>>> code-generation part can be much more efficiently replaced by inlining >>>> performed at compile-time. >>>> >>> What FFC and other code generators do is a form of metaprogramming, so I >>> don't see what point you're trying to make. >> >> As mentioned above, we are talking about compile-time implicit inline >> code generation which is opposed to explicit code generation as done >> by FFC -- refer to MTL publications. >> > > No, you have addressed meta-programming which is the generation of code.
Why do you insist on that 'meta-programming' and 'explicit code-generation' are the same concept? One could argue that the latter could be achieved by 'meta-modeling', eg eclipse EMF, but the former is more general and particularly involves compile-time inlining by template meta-programming. In this context, as it is clear, meta-programming is referred to c++ template meta-programming. FFC > does employ loop unrolling but it does not use static polymorphism. There is > no fundamental reason why it could not also use static polymorphism (i.e. > generate templated classes and functions). What would be the point of using static polymorphism in FFC-generated code followed by JIT? Why not using it directly? > > MTL4 does do some very neat things, and the performance for a number of > operations is very impressive. However, if you look at the code you will see > that for relatively simple operations it, and uBLAS, are very sophisticated. > Advocating such an approach for differential equations without a proof of > concept does not demonstrate an appreciation of the complexity of > differential equations and variational methods over basic linear algebra > operations. It's the job of the DSL, in this case the form language, to hide the complexity. The DSL can still live happily with the template meta-programming approach. -Ali > > Garth > > > >> >> -Ali >> >>> Garth >>> >>>> Without having a concrete meta-programming implementation, it may be >>>> impossible to predict how much performance one would gain compared to >>>> FFC. However, MTL4 has been reported to be many times faster than >>>> code-generation means such as ATLAS. >>>> >>>> Based on this, are there any specific benefits in FFC code-generation >>>> which may not be covered by meta-programming? >>>> >>>> >>>> -Ali >>>> _______________________________________________ >>>> DOLFIN-dev mailing list >>>> [email protected] >>>> http://www.fenics.org/mailman/listinfo/dolfin-dev >>> >>> > > > _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
