スラストグラフから簡単な例をコンパイルしようとしています。
現時点では、すべてをコメントアウトしていますmain(void)
私は誰かが喜んで与えてくれるあらゆる方向性を探しています!
私のコンパイルエラーはこれです:
mseil@cuda:~/mseil_CUDA/test$ nvcc Example.cu
/usr/local/cuda/bin/../include/thrust/detail/device/cuda/reduce_by_keyvalue.inl(90): error: name followed by "::" must be a class or namespace name
/usr/local/cuda/bin/../include/thrust/graph/detail/adjacency_list.inl(141): error: name followed by "::" must be a class or namespace name
/usr/local/cuda/bin/../include/thrust/graph/detail/adjacency_list.inl(213): error: name followed by "::" must be a class or namespace name
/usr/local/cuda/bin/../include/thrust/graph/detail/adjacency_list.inl(344): error: name followed by "::" must be a class or namespace name
4 errors detected in the compilation of "/tmp/tmpxft_00007122_00000000-9_Example.cpp4.ii".
最初のエラーであるinclude/thrust/detail/device/cuda/reduce_by_keyvalue.inl
ファイルの 90 行目に焦点を合わせましたが、何が問題なのかわかりません。私は C++ を初めて使用します (C は初心者レベルで知っています)。テンプレート ファイルに関してはすべて問題ないように見えます。NVIDIA の担当者が何をしているのかを知らないとショックを受けるでしょう。
90行目あたりのコード:
typedef typename thrust::iterator_traits<InputIterator1>::difference_type difference_type;
difference_type n =key_last - key_first;
difference_type N =result_last - result_first;
const std::size_t BLOCK_SIZE =512; // number of threads per block
const std::size_t MAX_BLOCKS =thrust::experimental::arch::max_active_threads() / BLOCK_SIZE;
const std::size_t NUM_BLOCKS =std::min( MAX_BLOCKS, n + (BLOCK_SIZE - 1) / BLOCK_SIZE); //offending line.
そして現在、私のメインの唯一のコード: (他のすべてはコメントされています。)
#include <thrust/graph/adjacency_list.hpp>
using namespace thrust;
int main(void){
typedef adjacency_list<undirectedS, disallow_parallelS> graph_t;
return 0;
}