romeric / Fastor

A lightweight high performance tensor algebra framework for modern C++

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some arithmethic operations on const TensorMaps fail

matthiasneuner opened this issue · comments

Hello Roman,

for TensorMap on const data, some arithmetic operations do not work for me:

    using namespace Fastor;

    const double dataA[] = {1,2,3};
    const double dataB[] = {1,2,3};

    TensorMap<const double, 3,1> a ( dataA );
    TensorMap<const double, 3,1> b ( dataB );

    const auto res1 = evaluate( a - b ); //fails 
    const auto res2 = evaluate( a + b ); //fails 
    const auto res3 = evaluate( a * 2 ); //fails 

No issues occur without the const identifiers.
Thank you again in advance :-) !

commented

Thanks for reporting these issues. Now fixed here c59e38b. Fastor does not have much test coverage for TensorMaps at the moment so please report any issues you come across.