Re: [eigen] Eigen Types as Parameters for Functions |

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

On 26.01.2012 14:33, Benoit Jacob wrote:

2012/1/26 Christian Seiler<christian@xxxxxxxx>:

- subclass of MatrixBase, i.e. can be used inside the function like a
Matrix object
- has private members containing the above-mentioned bits of
information (pointer to first element, dimension, ...)
- can be implicitly converetd to from any compatible MatrixBase (i.e.
foo(mat) and foo(mat.block(...)) can be used directly)

Just note that this is only possible for those matrix expressions
whose coefficients are stored in memory with a simple enough layout
that can be described in terms of strides. That is what we call a
"Direct Access" matrix expression; the test is ExpressionType::Flags&
DirectAccessBit.

`Yes, and I would say this would be the main application, if you have
``complicated-enough functions (i.e. where you don't really bother about
``evaluating expressions to a temporary if required).
``And more importantly, when having parameters that are actually output
``parameters, you are more or less stuck to direct access types anyway --
``and this is a very important point, where currently const-correctness is
``ignored (almost) entirely.
`

With that said, yes, we have been considering doing this, that's bug 58:
http://eigen.tuxfamily.org/bz/show_bug.cgi?id=58
If someone wants to do this and needs mentoring, I should find time to
do at least that mentoring.

I'd be interested at least to join the "specification committee" ;)
Christoph
--
----------------------------------------------
Dipl.-Inf. Christoph Hertzberg
Cartesium 0.051
Universität Bremen
Enrique-Schmidt-Straße 5
28359 Bremen
Tel: (+49) 421-218-64252
----------------------------------------------