(Sorry if someone got this twice, the first was bounced because of the long
thread).

I fail to see the point of templating over array type.

Calling resize() leads to dynamic allocation which is exactly why we can't
use std::vector.

Having generated code call .size() on input arguments to determine array
lengths is useful
only in a few cases in ufc (mainly run-time determined quadrature points),
and in most
cases would defeat optimizations based on known array sizes in the
generated code.

We have had extremely few cases of problems with indexing arrays out of
range
with [] in generated code, so range checking is not a significant advantage
(except
maybe for the few power users who want to implement their own ufc code).

More important, templating ufc over the array type has the disadvantage of
changing
ufc from one interface to an "arbitrary" number of non-compatible
interfaces.

Martin
_______________________________________________
fenics mailing list
[email protected]
http://fenicsproject.org/mailman/listinfo/fenics

Reply via email to