iTesting out the email facilitywq!
authorhlthantr <devnull@localhost>
Tue, 6 Sep 2011 21:57:02 +0000 (21:57 +0000)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Aug 2012 23:14:52 +0000 (16:14 -0700)
README
src/CMakeLists.txt
src/cl_api.c

diff --git a/README b/README
index 1b2d0b7..28bfd73 100644 (file)
--- a/README
+++ b/README
@@ -51,6 +51,9 @@ threads but it was never tested
 unmap buffer. This extension "clIntelMapBuffer" directly maps dri_bo_map which
 is really convenient
 
+[Update]: Added support for EnqueueBuffer through a straightforward copy into 
+host-allocated memory after maping the buffer [Hari Thantry]
 Fulsim
 ------
 
index 34b8f0e..3da388f 100644 (file)
@@ -38,6 +38,7 @@ ADD_LIBRARY(cl_test STATIC
 TARGET_LINK_LIBRARIES(cl_test cl)
 
 ADD_EXECUTABLE(test_copy_buffer tests/test_copy_buffer.c)
+ADD_EXECUTABLE(test_enqueue_read tests/test_enqueue_read.c)
 ADD_EXECUTABLE(test_imm_parameters tests/test_imm_parameters.c)
 ADD_EXECUTABLE(test_2d_copy tests/test_2d_copy.c)
 ADD_EXECUTABLE(test_barrier tests/test_barrier.c)
@@ -47,7 +48,7 @@ ADD_EXECUTABLE(test_private_memory tests/test_private_memory.c)
 ADD_EXECUTABLE(test_constant_memory tests/test_constant_memory.c)
 ADD_EXECUTABLE(test_memory_leak tests/test_memory_leak.c)
 ADD_EXECUTABLE(test_perf_report tests/test_perf_report.c)
-ADD_EXECUTABLE(test_trigo tests/test_trigo.c)
+#ADD_EXECUTABLE(test_trigo tests/test_trigo.c)
 ADD_EXECUTABLE(mersenneTwister tests/mersenneTwister.c)
 ADD_EXECUTABLE(blackscholes tests/blackscholes.c)
 ADD_EXECUTABLE(matmul tests/matmul.c)
@@ -59,6 +60,7 @@ ADD_EXECUTABLE(binomialOption tests/binomialOption.c)
 ADD_EXECUTABLE(nbody tests/nbody.c)
 ADD_EXECUTABLE(svm_test tests/svm_test.c)
 TARGET_LINK_LIBRARIES(test_copy_buffer cl_test m)
+TARGET_LINK_LIBRARIES(test_enqueue_read cl_test m)
 TARGET_LINK_LIBRARIES(test_imm_parameters cl_test m)
 TARGET_LINK_LIBRARIES(test_2d_copy cl_test m)
 TARGET_LINK_LIBRARIES(test_barrier cl_test m)
@@ -68,7 +70,7 @@ TARGET_LINK_LIBRARIES(test_private_memory cl_test m)
 TARGET_LINK_LIBRARIES(test_constant_memory cl_test m)
 TARGET_LINK_LIBRARIES(test_memory_leak cl_test m)
 TARGET_LINK_LIBRARIES(test_perf_report cl_test m)
-TARGET_LINK_LIBRARIES(test_trigo cl_test m)
+#TARGET_LINK_LIBRARIES(test_trigo cl_test m)
 TARGET_LINK_LIBRARIES(mersenneTwister cl_test m)
 TARGET_LINK_LIBRARIES(blackscholes cl_test m)
 TARGET_LINK_LIBRARIES(matmul cl_test m)
index beab87f..7940348 100644 (file)
@@ -685,7 +685,10 @@ clEnqueueReadBuffer(cl_command_queue command_queue,
 {
        cl_int err = CL_SUCCESS;
        assert(ptr != NULL);
-       ptr = clIntelMapBuffer(buffer, &err);
+       void* temp_ptr = NULL;
+       temp_ptr = clIntelMapBuffer(buffer, &err);
+       assert(err == CL_SUCCESS);
+       memcpy(ptr, temp_ptr, cb);
        return err;
 }