Skip to content

Use of Thrust and CUDA

Cameron Smith edited this page Feb 8, 2024 · 3 revisions

This following details the usage of Thrust and CUDA APIs in Omega_h prior to the merge of https://github.com/SCOREC/omega_h/pull/60.

Thrust

thrust::for_each(...);
thrust::transform_reduce(...)
thrust::cuda_cub::cub::DeviceScan::InclusiveSum(...)
thrust::transform_inclusive_scan(...)
thrust::device_ptr<T>(...);
thrust::stable_sort(...)
in the context of reductions and scans:
- thrust::logical_and<T>
- thrust::plus<T>
- thrust::maximum<T>
- thrust::minimum<T>
- thrust::identity<T>

Cuda

cudaMalloc
cudaFree
cudaMallocHost
cudaFreeHost
cudaDeviceSynchronize
cudaGetDeviceCount
cudaSetDevice
cudaGetDevice
cudaFree
cudaMemcpy
Clone this wiki locally