Allow for negative stride
Submitted by ric..@..il.com
Assigned to Nobody
As far as I understood currently inner and outer strides must be positive (see eigen_assert(innerStride>=0 && outerStride>=0) at line 77 of Stride.h) but I don't see the reason for this.
For my application I need to copy a matrix after flipping the rows from top to bottom. This could be done by using a map with a negative stride but it is currently not allowed.
I tried removing the above mentioned line from Stride.h and using a negative stride and everything seems to work fine..
Is there any reason not to use negative strides? If so is there another way I can do the row flipping? (my current workaround is to copy line-by-line in a for loop).
Thanks and regards.