Five different ways to sum vectors in PyCUDA

PyCUDA

Version 1: using SourceModule

Version 1 using SourceModule

Version 2: using SourceModule and copying data from host to device on-the-fly

Version 2 using SourceModule and copying data from host to device on-the-fly

Version 3: using gpuArrays

Version 3 using gpuarrays

Version 4: using ElementwiseKernel

Version 4 using ElementwiseKernel

Version 5: using SourceModule while handling vectors by gpuArray

Version 5 using SourceModule while handling vectors by gpuArray

We are teaching, researching and consulting parallel programming on Graphics Processing Units (GPUs) since the delivery of CUDA. We also play Matlab and Python.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store