Discussion:
[eigen] Eigen3 features request
Jaime de la Cruz Rodríguez
2018-11-01 11:31:44 UTC
Permalink
Dear Eigen developers,
I am following very closely the development of the tensor class in Eigen3.
It is extremely fast and it provides multidimensional arrays to C++ users
and in particular to scientists that require very high performance in their
codes (like me!).

I would like to kindly propose two features that, to my knowledge, are not
yet included in the current implementation but that might be of interest to
many users:


1. I mentioned this one in the forum but for completeness I also mention
it here: it would be great to be able to extract slices of a tensor that
point to the original data-block (without performing any data copies). That
way one could modify part of the data in, for example, a separate function.
That sub-tensor would have to be somewhat sparse, but that is easily
solvable by adjusting the stride and the offset of each dimension.
2. It would be very useful to be able to start indexing some of the
dimensions of the tensor at user-selected values. For example, I might want
to have an array that covers a range of indexes from -10 to 10 or from 200
to 300. This feature would be useful to people that operate with domain
decomposed variables among threads/processes and want to keep track of the
sub-domain location in the original cube.


I understand that you are already swamped developing many different
packages of the library. I can guarantee that many users in physics and
mathematics could benefit from these features in the long term. I actually
wrote my own array class based on templates including all these features,
but I did not want to go into expression template optimization, which is a
big point for the tensor class in Eigen. Also, being able to include auto
differentiation in the future seems very promising.

Jaime
William Tambellini
2018-11-01 12:46:36 UTC
Permalink
Hi Jaime

Is nt your request #1 possible with chip()

https://github.com/eigenteam/eigen-git-mirror/tree/master/unsupported/Eigen/CXX11/src/Tensor#operation-chipconst-index-offset-const-index-dim

?

Kind

WT.


William Tambellini | Senior Software Developer | SDL Language Weaver Los Angeles | ***@sdl.com
http://www.sdl.com


________________________________

www.sdl.com
SDL Enterprise Technologies, Inc. - all rights reserved. The information contained in this email may be confidential and/or legally privileged. It has been sent for the sole use of the intended recipient(s). If you are not the intended recipient of this mail, you are hereby notified that any unauthorized review, use, disclosure, dissemination, distribution, or copying of this communication, or any of its contents, is strictly prohibited. If you have received this communication in error, please reply to the sender and destroy all copies of the message.
Registered address: 201 Edgewater Drive, Suite 225, Wakefield, MA 01880, USA
From: Jaime de la Cruz Rodríguez <***@gmail.com>
Sent: Thursday, November 1, 2018 4:31 AM
To: ***@lists.tuxfamily.org
Subject: [eigen] Eigen3 features request

Dear Eigen developers,
I am following very closely the development of the tensor class in Eigen3. It is extremely fast and it provides multidimensional arrays to C++ users and in particular to scientists that require very high performance in their codes (like me!).

I would like to kindly propose two features that, to my knowledge, are not yet included in the current implementation but that might be of interest to many users:


1. I mentioned this one in the forum but for completeness I also mention it here: it would be great to be able to extract slices of a tensor that point to the original data-block (without performing any data copies). That way one could modify part of the data in, for example, a separate function. That sub-tensor would have to be somewhat sparse, but that is easily solvable by adjusting the stride and the offset of each dimension.
2. It would be very useful to be able to start indexing some of the dimensions of the tensor at user-selected values. For example, I might want to have an array that covers a range of indexes from -10 to 10 or from 200 to 300. This feature would be useful to people that operate with domain decomposed variables among threads/processes and want to keep track of the sub-domain location in the original cube.

I understand that you are already swamped developing many different packages of the library. I can guarantee that many users in physics and mathematics could benefit from these features in the long term. I actually wrote my own array class based on templates including all these features, but I did not want to go into expression template optimization, which is a big point for the tensor class in Eigen. Also, being able to include auto differentiation in the future seems very promising.

Jaime




Click here<https://www.mailcontrol.com/sr/36jQYBcViOTGX2PQPOmvUg0Q1FXI7AabVyon9HHM4XRRXM22VO6ePoKWk0Z5XTjLynLaxThOMFD1VsBVsOva5A==> to report this email as spam.
Jaime de la Cruz Rodríguez
2018-11-01 13:02:55 UTC
Permalink
Hello William,
looking at the chip documentation it looks as if you are forced to "chip"
along one dimension only.
Imagine that I have a 3D cube of dimension (100, 100, 100) and I want to
extract a sub-cube using the following index ranges (20:40, 10:23, 12:15).
The result is also a 3D cube.The chip routine will not allow this. The
slice function can do it, but by making a copy of the data.

Thanks for your reply!
Jaime
Post by William Tambellini
Hi Jaime
Is nt your request #1 possible with chip()
https://github.com/eigenteam/eigen-git-mirror/tree/master/unsupported/Eigen/CXX11/src/Tensor#operation-chipconst-index-offset-const-index-dim
?
Kind
WT.
William Tambellini | Senior Software Developer | SDL Language Weaver Los
http://www.sdl.com
*www.sdl.com* <http://www.sdl.com/>
SDL Enterprise Technologies, Inc. - all rights reserved. The information
contained in this email may be confidential and/or legally privileged. It
has been sent for the sole use of the intended recipient(s). If you are not
the intended recipient of this mail, you are hereby notified that any
unauthorized review, use, disclosure, dissemination, distribution, or
copying of this communication, or any of its contents, is strictly
prohibited. If you have received this communication in error, please reply
to the sender and destroy all copies of the message.​
Registered address: 201 Edgewater Drive, Suite 225, Wakefield, MA 01880, USA
------------------------------
*Sent:* Thursday, November 1, 2018 4:31 AM
*Subject:* [eigen] Eigen3 features request
Dear Eigen developers,
I am following very closely the development of the tensor class in Eigen3.
It is extremely fast and it provides multidimensional arrays to C++ users
and in particular to scientists that require very high performance in their
codes (like me!).
I would like to kindly propose two features that, to my knowledge, are not
yet included in the current implementation but that might be of interest to
1. I mentioned this one in the forum but for completeness I also
mention it here: it would be great to be able to extract slices of a tensor
that point to the original data-block (without performing any data copies).
That way one could modify part of the data in, for example, a separate
function. That sub-tensor would have to be somewhat sparse, but that is
easily solvable by adjusting the stride and the offset of each dimension.
2. It would be very useful to be able to start indexing some of the
dimensions of the tensor at user-selected values. For example, I might want
to have an array that covers a range of indexes from -10 to 10 or from 200
to 300. This feature would be useful to people that operate with domain
decomposed variables among threads/processes and want to keep track of the
sub-domain location in the original cube.
I understand that you are already swamped developing many different
packages of the library. I can guarantee that many users in physics and
mathematics could benefit from these features in the long term. I actually
wrote my own array class based on templates including all these features,
but I did not want to go into expression template optimization, which is a
big point for the tensor class in Eigen. Also, being able to include auto
differentiation in the future seems very promising.
Jaime
Click here
<https://www.mailcontrol.com/sr/36jQYBcViOTGX2PQPOmvUg0Q1FXI7AabVyon9HHM4XRRXM22VO6ePoKWk0Z5XTjLynLaxThOMFD1VsBVsOva5A==>
to report this email as spam.
Gael Guennebaud
2018-11-01 21:30:06 UTC
Permalink
Hi,

the doc seems be rather incomplete. Looking at the code, it seems that
tensor.slice(...) is writable just like any other expression. Moreover,
there are more variants than what the README shows, e.g.:

stridedSlice(const StartIndices& startIndices, const StopIndices&
stopIndices, const Strides& strides);

gael


On Thu, Nov 1, 2018 at 1:01 PM Jaime de la Cruz Rodríguez <
Post by Jaime de la Cruz Rodríguez
Dear Eigen developers,
I am following very closely the development of the tensor class in Eigen3.
It is extremely fast and it provides multidimensional arrays to C++ users
and in particular to scientists that require very high performance in their
codes (like me!).
I would like to kindly propose two features that, to my knowledge, are not
yet included in the current implementation but that might be of interest to
1. I mentioned this one in the forum but for completeness I also
mention it here: it would be great to be able to extract slices of a tensor
that point to the original data-block (without performing any data copies).
That way one could modify part of the data in, for example, a separate
function. That sub-tensor would have to be somewhat sparse, but that is
easily solvable by adjusting the stride and the offset of each dimension.
2. It would be very useful to be able to start indexing some of the
dimensions of the tensor at user-selected values. For example, I might want
to have an array that covers a range of indexes from -10 to 10 or from 200
to 300. This feature would be useful to people that operate with domain
decomposed variables among threads/processes and want to keep track of the
sub-domain location in the original cube.
I understand that you are already swamped developing many different
packages of the library. I can guarantee that many users in physics and
mathematics could benefit from these features in the long term. I actually
wrote my own array class based on templates including all these features,
but I did not want to go into expression template optimization, which is a
big point for the tensor class in Eigen. Also, being able to include auto
differentiation in the future seems very promising.
Jaime
Loading...