0Pricing
CUDA Academy · Lesson

Thrust Vectors and Transforms

STL-style parallelism on the GPU.

The STL for Your GPU

Thrust is a high-level library that feels like the C++ STL but runs on the GPU. You write almost no kernel code yourself. 🎉

Two Kinds of Vector

Thrust gives you host_vector for CPU memory and device_vector for GPU memory. They look identical but live in different worlds.

thrust::host_vector<int> h(100);
thrust::device_vector<int> d(100);

All lessons in this course

  1. cuBLAS GEMM Done Right
  2. Thrust Vectors and Transforms
  3. Thrust Reduce, Scan, and Sort
  4. cuDNN for Deep Learning
← Back to CUDA Academy