CUDA



  • Was bedeutet es, wenn ich einer Funktion das Wort

    __CUDA_HOST__
    

    vorranstelle?
    Ich vermute mal, dass diese Funktion dann nur auf dem Host existiert und für das Device nicht existiert?



  • Quelle: http://www.scribd.com/doc/45777254/Excerpt-Parallel-Processors
    Keyword: CUDA HOST

    ... CUDA device and can only be called from a kernel function or another device function. Device functions can have neither recursive function callsnor indirect function calls through pointers in them. The __host__ keywordindicates that the function being declared is a CUDA host function. A hostfunction is simply a traditional C function that executes on the host and canonly be called from another host function. By default, all functions in aCUDA program are host functions if they do not have any of the CUDAkeywords in their declaration. This makes sense, as many CUDA applica-tions are ported from CPU-only execution environments. ...

    Wenn ich das mal seicht deuten darf: Du kannst dir das ganze sparen, denn so sind alle Funktionen standardmäßig deklariert.

    Hoffe das konnte helfen.
    Gruß
    Ombre



  • Danke 👍


Anmelden zum Antworten