There's more...

OpenCL is a standardized cross-platform API for developing applications that exploit parallel computing in heterogeneous systems. The similarities with CUDA are remarkable, including everything from the memory hierarchy to the direct correspondence between threads and work items.

Even at the programming level, there are many similar aspects and extensions with the same functionality.

However, OpenCL has a much more complex device management model due to its ability to support a wide variety of hardware. On the other hand, OpenCL is designed to have code portability between products from different manufacturers.

CUDA, thanks to its greater maturity and dedicated hardware, offers simplified device management and higher-level APIs that make it preferable, but only if you are dealing with specific architectures (that is, NVIDIA graphic cards).

The pros and cons of the CUDA and OpenCL libraries, as well as the PyCUDA and PyOpenCL libraries, are explained in the following sections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset