OpenCV的编译支持CUDA我试图编译程序与OpenCV的Linux上的CUDA支持。我创建的Makefile:在Linux上
filtry_gpu: filtry_gpu.cu
nvcc -lopencv_highgui -lopencv_core -I/opt/opencv/include -L/opt/opencv/lib -Xcompiler \-fopenmp -Xcompiler \-Wall -Xlinker \-lgomp filtry_gpu.cu -o filtry_gpu
clean:
rm -f *.o
,但我得到的错误:
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(218): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(225): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(711): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(717): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(964): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(964): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(988): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(988): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1012): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1012): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1060): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1060): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1132): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1181): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1199): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1199): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1229): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1229): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1235): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1235): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1241): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1241): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1247): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1247): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1253): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1253): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1426): error: argument of type "__v2di *" is incompatible with parameter of type "__attribute((vector_size(16))) long *"
/usr/lib/gcc/x86_64-linux-gnu/4.3.5/include/emmintrin.h(1426): error: argument of type "__v2di" is incompatible with parameter of type "__attribute((vector_size(16))) long"
我OpenCV的版本是4.3.7,CUDA 4.0,G ++ 4.4
同样的程序运行在Visual Studio 2012的罚款。有没有什么办法可以在linux上编译?
2013-12-15
John