Registered Member
|
Can I inherit my own classes from MatrixBase<T> with stable concept? (i.e. stable, public requirements)
If yes, where can I find the concept details? Is it a good idea in general? |
Moderator
|
Probably not a good idea as the evaluation mechanism of Eigen's expressions will change from 3.2 to 3.3. What was your motivation for doing so? Maybe there is a better alternative...
|
Registered Member
|
This is why: https://forum.kde.org/viewtopic.php?f=74&t=127454 I wanted that the user can make any type he wants to be an Eigne Matrix expression, without extra conversion/copy. I ended up copy data and converting manually, but I think it could be a nice feature. (I know that making a stable template concept is hard) So, do you think it's a good idea? |
Moderator
|
oh, so you essentially wanted to write wrappers from non standard storage layout? Note that if the storage layer is such that the (i,j) can be accessed as:
*(base_ptr + i*row_stride + j*col_stride) then you can use Map for that, no need to write a wrapper. If that's not the case, then the minimum to implement is something like:
and of course, MyWrapper can be a template class too. |
Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar