質問

簡単な例を編集しようとしています スラストグラフ。

現時点では、すべてがコメントしています 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".

最初のエラー、行90の最初のエラーにゼロになりました include/thrust/detail/device/cuda/reduce_by_keyvalue.inl ファイルと私は問題が何であるかがわかりません。私は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;
}
役に立ちましたか?

解決

私はグラフLIB開発者、Drkkojimaを推力しています。 0.2RC03に更新し、問題を解決しました。

他のヒント

標準のI/Oファイルを含めることに問題がありますか?

問題は明らかにCUDA 3.2の非互換性であり、スラストグラフ0.2RC2で1.3を推力1.3です。 Cuda 3.1に戻り、1.2.1を押し込みましたが、これにより問題が大幅に解決されました。 (すべての例ファイルはそれぞれに1つを除いてコンパイルしますが、これと一緒に暮らすことができます。)

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top