CUDA new delete

前端 未结 1 1487
予麋鹿
予麋鹿 2020-12-05 03:06

Can someone give a clear explanation of how the new and delete keywords would behave if called from __device__ or __global__ code in CUDA 4.2?

相关标签:
1条回答
  • 2020-12-05 03:44

    C++ new and delete operate on device heap memory. The device allows for a portion of the global (i.e. on-board) memory to be allocated in this fashion. new and delete work in a similar fashion to device malloc and free.

    You can adjust the amount of device global memory available for the heap using a runtime API call.

    You may also be interested in the C++ new/delete sample code.

    CC 2.0 or greater is required for these capabilities.

    0 讨论(0)
提交回复
热议问题