This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
Bug 1357 - The following code compiles but gives assertion on Linux
Summary: The following code compiles but gives assertion on Linux
Status: NEW
Alias: None
Product: Eigen
Classification: Unclassified
Component: Tensor (show other bugs)
Version: unspecified
Hardware: All All
: Normal Unknown
Assignee: Nobody
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-02 12:30 UTC by cshay42
Modified: 2019-12-04 16:34 UTC (History)
4 users (show)



Attachments

Description cshay42 2016-12-02 12:30:55 UTC
The following code with what I believe is the 3.2 version (stable) I get an assertion:

#include <Eigen/Core>
#include <unsupported/Eigen/CXX11/Tensor>
#include <iostream>
#include <array>
#include <iostream>
#include <memory>
#include <thread>
#include <chrono>
#include <mutex>



using namespace Eigen;
using namespace std;


int main()
{
        Eigen::Tensor<double, 3> tensor(1, 1, 1);
        Eigen::Tensor<double, 2> tensor2(1,1);

        Eigen::Tensor<double, 1> tensor1;

        std::array<Eigen::IndexPair<int>, 1> product_dims;

        product_dims[0] =  { IndexPair<int>(1, 0) };
        product_dims[1] =  { IndexPair<int>(2, 1) };

        auto vv = tensor.contract(tensor2, product_dims);

        cerr<<"value: "<<vv<<endl;

        tensor1 = vv;
}


All I try to do is just contract a tensor on two dimensions... In general, contractions randomly give assertions, I think.
Comment 1 Nobody 2019-12-04 16:34:25 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1357.

Note You need to log in before you can comment on or make changes to this bug.