← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Some more uBlasMatrix clean-ups.

 

On Fri, Apr 25, 2008 at 5:09 PM, Garth N. Wells <gnw20@xxxxxxxxx> wrote:
>
>
>  Anders Logg wrote:
>  > Why should the functions be virtual?
>  >
>
>  This was discussed the other day (brought up by Ola)
>
>    http://www.fenics.org/pipermail/dolfin-dev/2008-April/007496.html
>
>  and has been implemented for a few functions in various la classes. I
>  was indifferent before to it, but now I see a benefit with the matrix
>  classes. If it's clear to me that a function is a virtual function, I
>  know that it can't be inlined and there will be some overhead which is
>  important to know for some operations.

One reason that inheritance is outmoded. Templated methods could be
inlined, whereas virtual methods cannot.

  Matt

>  Garth
-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which
their experiments lead.
-- Norbert Wiener


Follow ups

References