Using PyCUDA's gpuarray class

Much like how NumPy's array class is the cornerstone of numerical programming within the NumPy environment, PyCUDA's gpuarray class plays an analogously prominent role within GPU programming in Python. This has all of the features you know and love from NumPy—multidimensional vector/matrix/tensor shape structuring, array-slicing, array unraveling, and overloaded operators for point-wise computations (for example, +, -, *, /, and **).

gpuarray is really an indispensable tool for any budding GPU programmer. We will spend this section going over this particular data structure and gaining a strong grasp of it before we move on.

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

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