An Introduction to the Thrust Parallel Algorithms

An Introduction to the Thrust Parallel Algorithms
1 / 1
An Introduction to the Thrust Parallel Algorithms - slide 1 of 18 An Introduction to the Thrust Parallel Algorithms - slide 2 of 18 An Introduction to the Thrust Parallel Algorithms - slide 3 of 18 An Introduction to the Thrust Parallel Algorithms - slide 4 of 18 An Introduction to the Thrust Parallel Algorithms - slide 5 of 18 An Introduction to the Thrust Parallel Algorithms - slide 6 of 18 An Introduction to the Thrust Parallel Algorithms - slide 7 of 18 An Introduction to the Thrust Parallel Algorithms - slide 8 of 18 An Introduction to the Thrust Parallel Algorithms - slide 9 of 18 An Introduction to the Thrust Parallel Algorithms - slide 10 of 18 An Introduction to the Thrust Parallel Algorithms - slide 11 of 18 An Introduction to the Thrust Parallel Algorithms - slide 12 of 18 An Introduction to the Thrust Parallel Algorithms - slide 13 of 18 An Introduction to the Thrust Parallel Algorithms - slide 14 of 18 An Introduction to the Thrust Parallel Algorithms - slide 15 of 18 An Introduction to the Thrust Parallel Algorithms - slide 16 of 18 An Introduction to the Thrust Parallel Algorithms - slide 17 of 18 An Introduction to the Thrust Parallel Algorithms - slide 18 of 18
An Introduction to the Thrust Parallel Algorithms Library What is Thrust? High-Level Parallel Algorithms Library Parallel Analog of the C Standard Template Library (STL) Performance-Portable Abstraction Layer Productive way to program

Related Topics

Download this presentation From Below

"An Introduction to the Thrust Parallel Algorithms" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

Presentation Transcript

01
An Introduction to the
Thrust Parallel Algorithms Library<br>
02
What is Thrust? High-Level Parallel Algorithms Library

Parallel Analog of the C++ Standard Template Library (STL)

Performance-Portable Abstraction Layer

Productive way to program CUDA<br>
03
Example #include <thrust/host_vector.h>
#include <thrust/device_vector.h>
#include <thrust/sort.h>
#include <cstdlib>

int main(void)
{
// generate 32M random numbers on the host
thrust::host_vector<int> h_vec(32 << 20);
thrust::generate(h_vec.begin(), h_vec.end(), rand);

// transfer data to the device
thrust::device_vector<int> d_vec = h_vec;

// sort data on the device
thrust::sort(d_vec.begin(), d_vec.end());

// transfer data back to host
thrust::copy(d_vec.begin(), d_vec.end(), h_vec.begin());

return 0;
}<br>