2017-08-14 96 views
0

如何在如何編譯CUDA牛頓模板元編程示例程序

Evaluating expressions consisting of elementwise matrix operations in Thrust

僅供參考編譯樣本CUDA牛頓元編程程序,牛頓是在這裏:https://github.com/jaredhoberock/newton

這裏開始我的輸出:

nvcc -I. -I/local/cuda/include test_newton.cu 
nvcc warning : The 'compute_20', 'sm_20', and 'sm_21' architectures are deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). 
./newton/detail/range/range_traits.hpp(171): error: expected a ">" 

./newton/detail/range/range_traits.hpp(177): warning: parsing restarts here after previous syntax error 

./newton/detail/range/range_traits.hpp(171): error: mismatched delimiters in default argument expression 

./newton/detail/range/range_traits.hpp(177): error: expected a "," or ">" 

./newton/detail/range/range_traits.hpp(177): error: expected a "," or ">" 

./newton/detail/range/range_traits.hpp(177): error: expected a declaration 

./newton/detail/arithmetic.hpp(35): error: namespace "newton::detail" has no member "lazy_enable_if_at_least_one_is_range" 

./newton/detail/arithmetic.hpp(36): error: namespace "newton::detail" has no member "lazy_enable_if_at_least_one_is_range" 

./newton/detail/arithmetic.hpp(37): error: namespace "newton::detail" has no member "lazy_enable_if_at_least_one_is_range" 

這是我的NVCC:

nvcc -V           
nvcc: NVIDIA (R) Cuda compiler driver 
Copyright (c) 2005-2016 NVIDIA Corporation 
Built on Tue_Jan_10_13:22:03_CST_2017 
Cuda compilation tools, release 8.0, V8.0.61 

最後,由於牛頓在兩年內沒有變化,我甚至應該嘗試使用它嗎?我喜歡它試圖做的事情。

幫助?謝謝。

回答

0

我通過將模板中的>>分隔爲>來編譯它。顯然C++的某些版本允許>>但其他版本不允許。

這引發了其他問題,我將單獨發佈。