Why use OpenCL ?

by EEVa

You may own a nVidia graphic card with CUDA support, in this very case, you may hesitate between OpenCL and CUDA framework for parallel computing. While CUDA is very optimized for nVidia’s GPU, OpenCL is much more portable and will work in heterogeneous environment and has a CPP API !

But one thing is for sure, after spending an afternoon trying to get a simple SubBuffer to work I just want to shout : DAMN nVidia’s OpenCL IMPLEMENTATION ! This things just segfaults, that’s it:

cl_buffer_region: 0, 2359296
==18995== Jump to the invalid address stated on the next line
==18995==    at 0x0: ???
==18995==    by 0x80C2FDB: Parallel::draw_rect(int, int, int, int, int, int, int) (in ...)
==18995==    by 0x80C4E76: Capture::rect(Rect const&, int, int, Rect const&) (in ...)
==18995==    by 0x80C5F0A: Front::opaque_rect(Rect const&, int, Rect const&) (in ...)
==18995==    by 0x80C72DD: client_mod::opaque_rect(Rect const&, unsigned int) (in ...)
==18995==    by 0x80D6B4A: rdp_orders::process_opaque_rect(Stream&, client_mod*, RDPPrimaryOrderHeader const&) (in ...)
==18995==    by 0x80D69EE: rdp_orders::rdp_orders_process_orders(Stream&, int, client_mod*) (in ...)
==18995==    by 0x80D9E39: rdp_rdp::process_update_pdu(Stream&, client_mod*) (in ...)
==18995==    by 0x80D913C: rdp_rdp::process_data_pdu(Stream&, client_mod*) (in ...)
==18995==    by 0x80DABC7: mod_rdp::mod_signal() (in ...)
==18995==    by 0x80AA085: Session::step_STATE_RUNNING(timeval&) (in ...)
==18995==    by 0x80AA57C: Session::session_main_loop() (in ...)
==18995==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

It feels much better once it’s out 🙂