Create buffer with CL_MEM_ALLOC_HOST_PTR enabled
@@ -157,7 +157,7 @@ public class OCLMemoryManager extends TornadoLogger implements TornadoMemoryProv
*/
public void allocateRegion(long numBytes) {
heapLimit = numBytes;
- buffer = deviceContext.getPlatformContext().createBuffer(OCLMemFlags.CL_MEM_READ_WRITE, numBytes);
+ buffer = deviceContext.getPlatformContext().createBuffer(OCLMemFlags.CL_MEM_READ_WRITE | OCLMemFlags.CL_MEM_ALLOC_HOST_PTR, numBytes);
}
public void init(OCLBackend backend, long address) {
