Если я создаю объект, то оберните его в thrust :: device_ptr , займет ли это время жизни объекта? Например: < /p>
int* some_memory;
cudaMalloc(some_memory, 100);
thrust::device_ptr thrust_ptr(some_memory);
...
// Should I?
// cudaFree(thrust_ptr.get());
// or thrust::~device_ptr() calls it
Подробнее здесь: https://stackoverflow.com/questions/796 ... -points-to
Мобильная версия