代码之家  ›  专栏  ›  技术社区  ›  Nils

CUDA和STL矢量

  •  1
  • Nils  · 技术社区  · 14 年前

    刚刚了解到许多cpp特性(包括stl vector类)在cu文件中不起作用。即使在宿主代码中使用它们。

    我试着用cmake和

    cuda_add_executable(
    Blah
    Blah.cu
    BlahKernel.cu
    HostCodeWithVector.cpp
    )
    

    1 回复  |  直到 14 年前
        1
  •  2
  •   Andrey    14 年前

    自从 __host__