Ask Your Question

Revision history [back]

Correct dealocation of streams on GPU memory

The following code creates one stream. nvidia-smi shows that 76 megabytes on GPU-memory are needed.

What is the correct way to close the stream and free the memory?

int main(int argc, char** argv){

cv::cuda::Stream* stream = new cv::cuda::Stream;
stream[0].queryIfComplete();
delete stream;
return 0;}

Correct dealocation of streams on in GPU memory

The following code creates one stream. nvidia-smi shows that 76 megabytes on GPU-memory are needed.

What is the correct way to close the stream and free the memory?

int main(int argc, char** argv){

cv::cuda::Stream* stream = new cv::cuda::Stream;
stream[0].queryIfComplete();
delete stream;
return 0;}