ABSTRACT

This chapter focuses on Graphics Processing Unit (GPU) programming languages other than OpenCL and Compute-Unified Device Architecture (CUDA). It presents some of the common Application Programming Interfaces (APIs), such as Open Graphics Library (OpenGL), OpenGL Embedded Systems (ES), OpenCV, and Apple's Metal API. Python has the ability to write GPU code through two powerful libraries, PyOpenCL and PyCUDA. They closely follow the OpenCL and CUDA APIs, respectively, and abstract away much of the boilerplate code often needed to write GPU code. The base library itself is written in C++ so that Python can stay out of the way for maximum performance. One of the unique and very convenient options within PyOpenCL and PyCUDA is the ability to quickly write kernels to perform element-wise operations. An element-wise operation is an operation that is performed on every single element with a vector or in the case of Python, a Numpy array container.