Skip to main content

Examples of Thrust code for GPU Parallelization

Submission Number: 12
Submission ID: 54
Submission UUID: a3b413b8-f9cf-41f8-afdb-e6805863e920
Submission URI: /form/resource

Created: Thu, 09/19/2019 - 16:13
Completed: Thu, 09/19/2019 - 16:13
Changed: Sun, 11/12/2023 - 12:19

Remote IP address: 130.215.55.231
Language: English

Is draft: No
Yes
Examples of Thrust code for GPU Parallelization
Learning
Intermediate, Advanced
Some examples for writing Thrust code. To compile, download the CUDA compiler from NVIDIA. This code was tested with CUDA 9.2 but is likely compatible with other versions. Before compiling change extension from thrust_ex.txt to thrust_ex.cu. Any code on the device (GPU) that is run through a Thrust transform is automatically parallelized on the GPU. Host (CPU) code will not be. Thrust code can also be compiled to run on a CPU for practice.