Frage

Ich versuche, ein einfaches Beispiel aus zu kompilieren Schubdiagramm.

Im Moment habe ich alles kommentiert main(void)

Ich suche nach einer Richtung, die jemand bereit ist zu geben!

Mein Kompilierungsfehler ist Folgendes:

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".

Ich habe den ersten Fehler aufgenommen, Zeile 90 der include/thrust/detail/device/cuda/reduce_by_keyvalue.inl Datei und ich kann nicht sehen, was das Problem ist. Ich bin neu in C ++ (und ich kenne C auf Anfängerstufe). In Bezug auf eine Vorlagendatei sieht alles gut aus, und ich wäre schockiert, wenn die Jungs von Nvidia nicht wissen, was sie tun-also muss ich es sein.

Der Code um Zeile 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.

Und derzeit der einzige Code in meinem Haupt -Code: (Alles andere wird kommentiert.)

#include <thrust/graph/adjacency_list.hpp>
using namespace thrust;

int main(void){
    typedef adjacency_list<undirectedS, disallow_parallelS> graph_t;

    return 0;
}
War es hilfreich?

Lösung

Ich bin Schubgrafiklib -Entwickler Drkkojima. Ich habe auf 0,2RC03 aktualisiert und die Probleme gelöst.

Andere Tipps

Problem bei der Einbeziehung der Standard -E/A -Dateien?

Das Problem ist anscheinend eine Inkompatibilität von CUDA 3.2 und 1,3 mit einem Schub-Graph 0,2RC2. Wir rollten zurück zu CUDA 3.1 und dem Stub-Graph 1.2.1, und dies hat das Problem weitgehend gelöst. (Alle Beispieldateien werden mit Ausnahme eines jeweils kompiliert; aber wir können damit leben.)

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top