[Dune-devel] [Dune-Bugs] [#1041] BCRSMatrix does not always initialize data memory
Markus Blatt
markus at dr-blatt.de
Tue Jan 22 12:53:26 CET 2013
Hi Oliver,
On Tue, Jan 22, 2013 at 09:58:19AM +0100, Oliver Sander wrote:
> But let me ask again: why the need for MatrixHasTrivialConstructor?
> Does it really make a measurable difference to omit the empty
> default constructors in BCRSMatrix?
I do not know, but I am pretty sure that it is not slower. Sure one could
rely on the compiler optimization, but why depend on it if we can do
it ourselves.
> And if it does matter: shouldn't we use std::is_pod instead of the
> hand-coded MatrixHasTrivialConstructor?
I doubt that FieldMatrix can be regarded as a plain old datatype.
Quoting cplusplus.com: "A POD type (which stands for Plain Old Data
type) is a type whose characteristics are supported by a data type in
the C language, either cv-qualified or not."
Cheers,
Markus
More information about the Dune-devel
mailing list