Registered Member
|
I am starting a large new project where I need multidimensional arrays to store data.
I have been comparing the Tensor class from Eigen to blitz++. In all my tests, Eigen is significantly faster when performing operations with full tensors, so I would like to use it. The one feature that I feel is missing compared to Blitz is the possibility to extract a slice without actually copying any data, but instead pointing to the original data block. In Blitz the user can basically use to copy or not depending on how the assignment is done. For example (using Tensor notation), the following code would make a copy of the data from "a" to "c":
However if we replace the way c is assigned, it would still point to the original data block without making a copy:
This behaviour cannot be reproduced with the Map feature because (as far as I understood it), it assumes that the data are strictly consecutive in memory, which is not true if we slice over the non-fast axes. I have read the updated version of README inside the Tensor class directory and I think I have tried everything I could but I could not reproduce this behaviour as in blitz. But the feature itself would be excellent to have because it would allow to visualise subsets of the tensor very efficiently. Would it be possible to implement such feature into the Tensor class? ...or is it already implemented and I completely missed it? I tried to ask in Stackoverflow but no success... |
Registered users: Bing [Bot], Evergrowing, Google [Bot], rblackwell