Chiel
Chiel

Reputation: 6194

Eigen Tensor compilation error

I am experimenting with Eigen::Tensor, and I do not manage to understand why the most basic example is failing. Why does this piece of code

#include <unsupported/Eigen/CXX11/Tensor>

int main()
{
    Eigen::Tensor<int, 2> a(4, 4);
    Eigen::Tensor<int, 2> b(4, 4);

    a.setRandom();
    b.setRandom();

    a += b;

    return 0;
}

results in error:

In file included from eigen.cpp:2:
In file included from /usr/local/include/eigen3/unsupported/Eigen/CXX11/Tensor:142:
/usr/local/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:39:7: error: class template partial specialization is not
      more specialized than the primary template [-Winvalid-partial-specialization]
class TensorStorage<T, FixedDimensions, Options_>
      ^
/usr/local/include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorStorage.h:34:63: note: template is declared here
template<typename T, typename Dimensions, int Options_> class TensorStorage;

Upvotes: 0

Views: 667

Answers (1)

ggael
ggael

Reputation: 29205

Please, update to the default branch (recommended for the Tensor module), or at least to the head of the 3.3 branch.

Upvotes: 1

Related Questions