<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Parallel-Algorithms on Sanketh's Blog</title><link>https://sankethbk.github.io/blog/tags/parallel-algorithms/</link><description>Recent content in Parallel-Algorithms on Sanketh's Blog</description><generator>Hugo -- 0.166.0</generator><language>en-us</language><lastBuildDate>Wed, 02 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://sankethbk.github.io/blog/tags/parallel-algorithms/index.xml" rel="self" type="application/rss+xml"/><item><title>CUDA Reduction: Parallel Sum, Max, and Other Tree Algorithms</title><link>https://sankethbk.github.io/blog/posts/gpu/2026-09-02-1-cuda-reduction/</link><pubDate>Wed, 02 Sep 2026 00:00:00 +0000</pubDate><guid>https://sankethbk.github.io/blog/posts/gpu/2026-09-02-1-cuda-reduction/</guid><description>&lt;h1 id="cuda-reduction-parallel-sum-max-and-other-tree-algorithms"&gt;CUDA Reduction: Parallel Sum, Max, and Other Tree Algorithms&lt;/h1&gt;
&lt;p&gt;The &lt;a href="https://sankethbk.github.io/blog/gpu/2026-09-01-2-cuda-occupancy"&gt;previous note&lt;/a&gt; covered occupancy. This note covers &lt;strong&gt;reduction&lt;/strong&gt;: taking a large array and producing a single value (a sum, max, min, product, or any associative binary operation). Reduction is one of the most important parallel algorithms on a GPU, and it teaches several key CUDA ideas at once: shared memory, thread cooperation, warp-level execution, and multi-kernel launches.&lt;/p&gt;
&lt;p&gt;This note builds the algorithm step by step, from a naive atomic version to a tree-based shared-memory reduction.&lt;/p&gt;</description></item></channel></rss>