如何编译cuda newton模板元编程示例程序

时间:2017-08-14 21:15:38

标签: cuda template-meta-programming

如何在

中编译样本cuda newton元编程程序

Evaluating expressions consisting of elementwise matrix operations in Thrust

作为参考,牛顿在这里: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

最后,由于牛顿在两年内没有变化,我甚至应该尝试使用它?我喜欢它想做的事情。

帮助?感谢。

1 个答案:

答案 0 :(得分:1)

我通过分离>>来编译它进入> >在模板中。显然,某些版本的C ++允许>>但其他人则没有。

这提出了我将单独发布的其他问题。