summaryrefslogtreecommitdiff
path: root/libopencl
diff options
context:
space:
mode:
authorTor Aamodt <[email protected]>2010-08-12 19:35:44 -0800
committerTor Aamodt <[email protected]>2010-08-12 19:35:44 -0800
commit83a96bb39177a0767c6d851f4fe3ff92757652f5 (patch)
tree2225a6318105eaaaf94c30309603814f8074d520 /libopencl
parentb621489268b00e816eb18e72be53f9a049787ffb (diff)
- allow multiple clCreateBuffer wth same host_ptr (undefined behavior in OpenCL spec, but
required for oclTranspose). - undo earlier fix that wasn't a fix [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 7194]
Diffstat (limited to 'libopencl')
-rw-r--r--libopencl/opencl_runtime_api.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/libopencl/opencl_runtime_api.cc b/libopencl/opencl_runtime_api.cc
index b886f90..054d517 100644
--- a/libopencl/opencl_runtime_api.cc
+++ b/libopencl/opencl_runtime_api.cc
@@ -371,7 +371,6 @@ _cl_mem::_cl_mem(
m_device_ptr = (size_t) gpgpu_ptx_sim_malloc(size);
if( host_ptr )
gpgpu_ptx_sim_memcpy_to_gpu( m_device_ptr, host_ptr, size );
- *errcode_ret = CL_SUCCESS;
}
cl_mem _cl_context::CreateBuffer(
@@ -381,9 +380,7 @@ cl_mem _cl_context::CreateBuffer(
cl_int * errcode_ret )
{
if( host_ptr && (m_hostptr_to_cl_mem.find(host_ptr) != m_hostptr_to_cl_mem.end()) ) {
- printf("GPGPU-Sim OpenCL API: clCreateBuffer - buffer already created for this host variable\n");
- *errcode_ret = CL_MEM_OBJECT_ALLOCATION_FAILURE;
- return NULL;
+ printf("GPGPU-Sim OpenCL API: WARNING ** clCreateBuffer - buffer already created for this host variable\n");
}
cl_mem result = new _cl_mem(flags,size,host_ptr,errcode_ret);
m_devptr_to_cl_mem[result->device_ptr()] = result;