Skip to main content
Cyberinfrastructure Community-wide Mentorship Network
Search
Join
Log in
Mentorship
Join CCMNet
CCMNet Guide
Mentorship Opportunities
Community
CCMNet Members
CCMNet Affinity Group
People
Affinity Groups
Blog
Jobs
Organizations
Community of Communities
Join the CSSN
Get Help
Ask a Question
Resources
Request a Consult
Projects
Knowledge Base
Mentorship Resources
KB Resources
Ask.CI Forum
Tags
About Us
About Us
User Guide
Become a Campus Champion
User Guide
Affinity Groups FAQ
Governance
Code of Conduct
News
About CCMNet
Annual Meeting
Tags
Examples of Thrust code for GPU Parallelization
Submission navigation links for Knowledge Base Resources
‹
Previous submission
Next submission
›
Submission information
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
Submitted by:
Mariana Pachon-Puentes
Language:
English
Is draft:
No
Webform:
Knowledge Base Resources
Approved
Yes
Title
Examples of Thrust code for GPU Parallelization
Category
Learning
Tags
parallelization
,
gpu
,
cuda
Skill Level
Intermediate
,
Advanced
Description
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.
Link to Resource
thrust_ex.txt