Re: [eigen] Matrix2i mean

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hi,

You could potentially use SafeInt as your custom scalar type:
https://github.com/dcleblanc/SafeInt/blob/master/SafeInt.hpp
(with a performance penalty) then you should be safe from these issues.

Cheers,
Stewart

On Tue, 5 Nov 2019 at 15:46, Peter <list@xxxxxxxxxxxxxxxxx> wrote:
Dear Christoph,


Am 05.11.19 um 16:36 schrieb Christoph Hertzberg:

> You could create your own custom type `my_int16` for which `my_int16 * my_int16` results in a `my_int32` (this needs to be told to Eigen, similar to how real*complex products are handled).

This could indeed be a way.
BTW, I was thinking in the spirit of exact scalar products for floating points like in C-XSC.
Maybe an option for Eigen 7.0.

Best regards,
Peter




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/