Enable workload-based device selection in OpenCL.

Change-Id: I8af49ccf498cafb48f9b82fabc4910c754ba0f96
Get it to build on Linux.

Change-Id: Ife109b8a123564c5d8e43c793fc6c9de9b9f2090
Remove compiler warnings.

Change-Id: I5f6f50e941031284fe519999a2fddede9753abea
Safer to use std::vector than heap array objects.

This change also fixes memory leaks.

Change-Id: I68a02a6de0b3d1f125e4c6cd164980a92e0fcbf0
Use scoped_ptr here for exception safety.

Normally scoped_ptr is preferred for local heap objects, than direct
new and delete pair.

Change-Id: Ia8783bfe5f9b37a9bd58f08cce89bf85d88199d1
Handle a case where the profile initialization fails.

Change-Id: Ifd1ab147926ab4f1d34161840d17fdf1ab3f9810
C++ style struct / enum declarations without typedef.

Change-Id: Idf9e7ddaf4b28c00222470460478631c37c79a6b