Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将cudaStream_t对象转换为CUStream?
cudaStream_t
CUStream
我发现了这个 hack,但我认为它不安全。或者,有没有办法只使用 CUDA 7.5 中的对象调用cudaLaunchKernelJCuda 应用程序?cudaStream_t
cudaLaunchKernel
在运行时和驱动程序 API 中的 C 级别, cudaStream_t它们CUStream是相同的类型,并且可以在任一 API 中互换使用。
在 JCUDA 级别,它似乎CUstream具有其构造函数的特殊化,用于使用现有实例初始化cudaStream_t实例。此替代构造函数的提供消除了您在问题中链接到的指针交换的需要。
CUstream