尝试包含LTensor失败

时间:2019-02-22 11:57:50

标签: c++ include tensor lib

在我看了这个问题之后: Michael Schlottke-Lakemper(https://scicomp.stackexchange.com/users/1724/michael-schlottke-lakemper),快速,轻量级的C ++张量库,用于与维度无关的代码,URL(版本:2014-04-05):https://scicomp.stackexchange.com/q/11276

我看了一些答案。下载ltensor之后,我将其包括在内,如存档说明中所述。但是现在我得到了这个错误:

g++ src/main.cpp -march=native -o main -fopenmp -I lib/Fastor -I lib/eigen -I lib/ltensor -I lib/ftensor 
In file included from lib/ltensor/./base/Array_base.h:29:0,
                 from lib/ltensor/LTensor.h:32,
                 from src/aLTensor.hpp:1,
                 from src/main.cpp:10:
lib/ltensor/./base/../storage/storage.h: In member function ‘long int GenericStorage<Type>::getBeginAddress(int, int)’:
lib/ltensor/./base/../storage/storage.h:207:62: error: expression cannot be used as a function
         gsize= (dim==0?0: stride(getPos(ordering,dim-1,rank) )) ;
                                                              ^
Makefile:7: recipe for target 'main' failed
make: *** [main] Error 1

要复制,只需在此处下载Directroy:https://code.google.com/archive/p/ltensor/并使用#include <LTensor.h>也许我做错了什么,您能帮我找到错误吗?

0 个答案:

没有答案