当我尝试与fastor-library(https://github.com/romeric/fastor)一起工作时存储库不存在。这是我代表我的错误,还是我应该与Fastor的作者打开问题?
代码:
#include "Fastor/Fastor.h"
int main(){
Fastor::Tensor<double,2> A;
return 0;
}
文件夹结构:
total 8
drwxr-xr-x 15 name name 4096 Feb 13 13:19 Fastor
-rw-r--r-- 1 name name 82 Feb 13 13:20 main.cpp
为什么我会收到以下错误?
g++ -std=c++14 -O3 -mavx -DNDEBUG main.cpp -o main
In file included from Fastor/simd_vector/SIMDVector.h:4:0,
from Fastor/Fastor.h:6,
from main.cpp:1:
Fastor/simd_vector/simd_vector_base.h:4:10: fatal error: commons/commons.h: No such file or directory
#include "commons/commons.h"
^~~~~~~~~~~~~~~~~~~
compilation terminated.
您是否可以重现错误,还是我做错了什么?
您的编译器命令应为:
g++ -std=c++14 -O3 -mavx -DNDEBUG main.cpp -o main -I Fastor
您应该只包括"Fastor.h"
而不是"Fastor/Fastor.h"
。