| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The original swap approach leads to potential undefined behavior (reading
uninitialized memory) and results in unnecessary copying of data for static
storage.
Here we pass down the move assignment to the underlying storage. Static
storage does a one-way copy, dynamic storage does a swap.
Modified the tests to no longer read from the moved-from matrix/tensor,
since that can lead to UB. Added a test to ensure we do not access
uninitialized memory in a move.
Fixes: #2119
|
|
|
|
|
|
|
| |
Adds copy constructors to Tensor ops, inherits assignment operators from
`TensorBase`.
Addresses #1863
|
|
|
|
|
|
|
| |
unsupported modules (by using the corresponding Doxytags file).
Manually grafted from d107a371c61b764c73fd1570b1f3ed1c6400dd7e
|
| |
|
| |
|
|
|
|
| |
some tests.
|
| |
|
| |
|
| |
|
|
|
|
| |
All the vectorization is now defined in the tensor evaluators. This will make it possible to relialably support devices with different packet types in the same compilation unit.
|
| |
|
| |
|
|
|
|
| |
"braces around scalar initializer"
|
|
|
|
| |
the evaluation of an expression.
|
|
|
|
| |
to call them from a CUDA kernel.
|
| |
|
|
|
|
| |
the Tensor class since most of the code currently already use integers.
|
| |
|
|
|
|
| |
the [] operator to index a tensor. Added unit tests to validate the use of std::map and a few more types as valid custom index containers
|
|
|
|
|
|
|
| |
types in addition to arrays of indices
Only compile the custom index code when EIGEN_HAS_SFINAE is defined. For the time beeing, EIGEN_HAS_SFINAE is a synonym for EIGEN_HAS_VARIADIC_TEMPLATES, but this might evolve in the future.
Moved some code around.
|
|
|
|
|
|
|
| |
user: Gabriel Nützi <gnuetzi@gmx.ch>
branch 'default'
changed unsupported/Eigen/CXX11/src/Tensor/Tensor.h
changed unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
|
|
|
|
|
|
| |
user: Gabriel Nützi <gnuetzi@gmx.ch>
branch 'default'
changed unsupported/Eigen/CXX11/src/Tensor/Tensor.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
using Sfinae and is_base_of to select correct template which converts to array<Index,NumIndices>
user: Gabriel Nützi <gnuetzi@gmx.ch>
branch 'default'
added unsupported/Eigen/CXX11/src/Tensor/TensorMetaMacros.h
added unsupported/test/cxx11_tensor_customIndex.cpp
changed unsupported/Eigen/CXX11/Tensor
changed unsupported/Eigen/CXX11/src/Tensor/Tensor.h
changed unsupported/Eigen/CXX11/src/Tensor/TensorMeta.h
changed unsupported/test/CMakeLists.txt
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
encoding it in the options.
|
|
|
|
| |
enables us to use 32bit indices to evaluate expressions on GPU faster while keeping the ability to use 64 bit indices to manipulate large tensors on CPU in the same binary.
|
|
|
|
| |
cuda kernels.
|
| |
|
| |
|
|
|
|
| |
Generalized a TensorMap constructor
|
|
|
|
|
|
|
| |
declare and initialize a tensor on the same line, as in:
Tensor<bla> T = A + B; or
Tensor<bla> T(A.reshape(new_shape));
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
efficiently compute convolutions and contractions in the future:
* The scheduling of computation is moved out the the assignment code and into a new TensorExecutor class
* The assignment itself is now a regular node on the expression tree
* The expression evaluators start by recursively evaluating all their subexpressions if needed
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the symCoeff() method of the the Tensor module and move the
functionality into a new operator() of the symmetry classes. This makes
the Tensor module now completely self-contained without symmetry
support (even though previously it was only a forward declaration and a
otherwise harmless trivial templated method) and also removes the
inconsistency with the rest of eigen w.r.t. the method's naming scheme.
|
| |
| |
| |
| |
| | |
Updated expression evaluation mechanism to also compute the size of the tensor result
Misc fixes and improvements.
|
| |
| |
| |
| |
| | |
Added the ability to parallelize the evaluation of a tensor expression over multiple cpu cores.
Added the ability to offload the evaluation of a tensor expression to a GPU.
|
| |
| |
| |
| | |
Improved support for tensor expressions.
|
|/
|
|
|
|
| |
* Added ability to map a region of the memory to a tensor
* Added basic support for unary and binary coefficient wise expressions, such as addition or square root
* Provided an emulation layer to make it possible to compile the code with compilers (such as nvcc) that don't support cxx11.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a symCoeff() method to the Tensor class template that allows the
user of the class to set multiple elements of a tensor at once if they
are connected by a symmetry operation with respect to the tensor's
indices (symmetry/antisymmetry/hermiticity/antihermiticity under
echange of two indices and combination thereof for different pairs of
indices).
A compile-time resolution of the required symmetry groups via meta
templates is also implemented. For small enough groups this is used to
unroll the loop that goes through all the elements of the Tensor that
are connected by this group. For larger groups or groups where the
symmetries are defined at run time, a standard run-time implementation
of the same algorithm is provided.
For example, the following code completely initializes all elements of
the totally antisymmetric tensor in three dimensions ('epsilon
tensor'):
SGroup<3, AntiSymmetry<0,1>, AntiSymmetry<1,2>> sym;
Eigen::Tensor<double, 3> epsilon(3,3,3);
epsilon.setZero();
epsilon.symCoeff(sym, 0, 1, 2) = 1;
|
|
This commit adds an initial implementation of a class template Tensor
that allows for the storage of objects with more than two indices.
Currently, only storing data and setting the object to zero for POD
data types are implemented.
|