[Dune] [#800] implement operator*( K, FieldVector< K, SIZE > )

Dune flyspray at dune-project.org
Fri Aug 13 20:03:21 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#800 - implement operator*( K, FieldVector< K, SIZE > )
User who did this - Martin Nolte (nolte)

----------
Maybe the stupid user is tempted to write small code. On the other hand, if you have a FieldVector x and want to pass 2*x to some function foo, you currently have to write

FieldVector y = x; y *= 2; foo( y );

This produces a lot of code for nothing: The temporary is created anyway. Moreover, we should be aware of inlining. These small functions will usually be inlined and hence produce exactly the code I wrote above.

In my opinion, convenient code for the expert is more important that fast code for the stupid user who does not care about performance. I think there are other places, where DUNE even forces performance losses upon the user (e.g., parts of the DUNE grid interface).

But you are right: It should be all of them or none.

Since this Task is by now 2 month old, I suggest to decide this on the next meeting (for good). Maybe we should combine this discussion with the expression templates, because the whole discussion seems void if expression templates are available.
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=800#comment2112

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list