May 2019
Intermediate to advanced
452 pages
12h 16m
English
As we discussed in the previous section, PyOpenCL has a clear advantage with respect to code length over OpenCL and HIP as the former is Python-based. Now, let's get our hands dirty and write our first PyOpenCL code. Follow these steps to get started:

import pyopencl as cl # Importing the OpenCL APIimport numpy # Import Numpy for using numbersfrom time import time # Import access to the current ...
Read now
Unlock full access