Reputation: 465
In my program, after calculations, there is a lot of memory left that is not cleared and is stored just like that. It is necessary to clear the buffer memory. What command can this be done in C ++?
Buffer myBuffer = Buffer(context, CL_MEM_READ_ONLY, count * sizeof(double));
queue.enqueueWriteBuffer(myBuffer, CL_TRUE, 0, count * sizeof(double), openF);
Upvotes: 1
Views: 1459
Reputation: 1119
But TBH i don't quite understand why you need it after the calculation. It's usually done before calculation, after it you just release the buffer.
Upvotes: 1