May 2019
Intermediate to advanced
452 pages
12h 16m
English
Using the ElementwiseKernel Python program example in Chapter 6, Working with CUDA and PyCUDA, (6.4) and the discussion in the How computing in CuPy works on Python section, develop a CuPy version of the same program.
With or without an ElementwiseKernel, use Numba and CuPy to compute the following formula given based on our earlier Numba examples:

The Pollution Index or Pollution Standard Index (PSI) is used to check pollution levels in a certain city, region, or country. It considers six air pollutants: sulphur dioxide (SO2), particulate matter (PM10), fine particulate matter (PM2.5), nitrogen ...
Read now
Unlock full access