mirror of
https://github.com/NVIDIA/cuda-samples.git
synced 2025-04-19 06:20:50 +01:00
37 lines
1.7 KiB
Markdown
37 lines
1.7 KiB
Markdown
# reduction - CUDA Parallel Reduction
|
|
|
|
## Description
|
|
|
|
A parallel sum reduction that computes the sum of a large arrays of values. This sample demonstrates several important optimization strategies for Data-Parallel Algorithms like reduction using shared memory, __shfl_down_sync, __reduce_add_sync and cooperative_groups reduce.
|
|
|
|
## Key Concepts
|
|
|
|
Data-Parallel Algorithms, Performance Strategies
|
|
|
|
## Supported SM Architectures
|
|
|
|
[SM 5.0 ](https://developer.nvidia.com/cuda-gpus) [SM 5.2 ](https://developer.nvidia.com/cuda-gpus) [SM 5.3 ](https://developer.nvidia.com/cuda-gpus) [SM 6.0 ](https://developer.nvidia.com/cuda-gpus) [SM 6.1 ](https://developer.nvidia.com/cuda-gpus) [SM 7.0 ](https://developer.nvidia.com/cuda-gpus) [SM 7.2 ](https://developer.nvidia.com/cuda-gpus) [SM 7.5 ](https://developer.nvidia.com/cuda-gpus) [SM 8.0 ](https://developer.nvidia.com/cuda-gpus) [SM 8.6 ](https://developer.nvidia.com/cuda-gpus) [SM 8.7 ](https://developer.nvidia.com/cuda-gpus) [SM 8.9 ](https://developer.nvidia.com/cuda-gpus) [SM 9.0 ](https://developer.nvidia.com/cuda-gpus)
|
|
|
|
## Supported OSes
|
|
|
|
Linux, Windows
|
|
|
|
## Supported CPU Architecture
|
|
|
|
x86_64, armv7l
|
|
|
|
## CUDA APIs involved
|
|
|
|
### [CUDA Runtime API](http://docs.nvidia.com/cuda/cuda-runtime-api/index.html)
|
|
cudaMemcpy, cudaFree, cudaSetDevice, cudaDeviceSynchronize, cudaGetDevice, cudaMalloc, cudaGetDeviceProperties
|
|
|
|
## Dependencies needed to build/run
|
|
[CPP11](../../../README.md#cpp11)
|
|
|
|
## Prerequisites
|
|
|
|
Download and install the [CUDA Toolkit 12.5](https://developer.nvidia.com/cuda-downloads) for your corresponding platform.
|
|
Make sure the dependencies mentioned in [Dependencies]() section above are installed.
|
|
|
|
## References (for more details)
|