[Dune-devel] [Dune-Bugs] [#1041] BCRSMatrix does not always initialize data memory

Oliver Sander sander at igpm.rwth-aachen.de
Tue Jan 22 18:07:43 CET 2013


>> There are different variants of std::is_pod that may be better suited.
>> How about std::is_trivially_default_constructible() ?
> I don't like it either, but the problem is - once more - C++03. All those nice
> type traits like std::is_pod et. al. are only available in C++11, so we can not
> use them on our current set of supported compilers (and they would be
> a pain in the ass (or even impossible) to emulate with a backwards compatibility
> layer in Dune).
I know.  My compiler actually implements it as a built-in.  Still we 
could have
let the c++0x design guide our's, like having a general 
HasTrivialConstructor
class in typetraits.hh that individual classes can specialize.

>
> My bet would also be to just leave out the optimization and hope that the compiler
> will do the Right Thing
I agree.  The template has been removed now.

> (and even if it fails, I doubt that zeroing some memory is the
> big performance pitfall during BCRSMatrix setup...) ;-)
It is not even zeroing anything.  AFAICT the default constructor of 
FieldMatrix
is just empty.

best,
Oliver

>
> Best,
>
> Steffen
>
>> best,
>> Oliver
>>
>>> Cheers,
>>>
>>> Markus
>>>
>>> _______________________________________________
>>> Dune-devel mailing list
>>> Dune-devel at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune-devel
>>
>> _______________________________________________
>> Dune-devel mailing list
>> Dune-devel at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-devel
> Steffen Müthing
> Universität Stuttgart
> Institut für Parallele und Verteilte Systeme
> Universitätsstr. 38
> 70569 Stuttgart
> Tel: +49 711 685 88429
> Fax: +49 711 685 88340
> Email: steffen.muething at ipvs.uni-stuttgart.de
>
>
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20130122/448370e5/attachment.htm>


More information about the Dune-devel mailing list