kylelutz/compute — pull request #134 by Mageswaran1989 (2014-06-09 13:51:39+00:00)
Title: Multi thread Example

Hi,
Added example multi_thread & visualize_kernel.
Request to review the multi thread example.
I am new to writing CMake file, added few stuff to example/CMakeLists.txt and made to compile if
BOOST_COMPUTE_USE_OFFLINE_CACHE is enabled.

Fixed warning in opencv_optical_flow_camera.

Modified matrix_transpose example, such that the matrix size can be controlled from command line.
When I try with bigger matrix I get following error
$ ./matrix_transpose 8 8
Float Matrix Size : 8192x8192
Size in MB : 256
Grid Size : 256x256 blocks
Local Size : 32x8 threads

Copy_Kernel
terminate called after throwing an instance of 'boost::exception_detail::clone_impl >'
what(): CL_MEM_OBJECT_ALLOCATION_FAILURE error executing CL_COMMAND_NDRANGE_KERNEL on GeForce GT 640 (Device 0).

Aborted (core dumped)
==================================================================
./matrix_transpose 20 20
Float Matrix Size : 20480x20480
Size in MB : 1600
Grid Size : 640x640 blocks
Local Size : 32x8 threads

terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Aborted (core dumped)