holoviz / datashader

Quickly and accurately render even the largest data.
http://datashader.org
BSD 3-Clause "New" or "Revised" License
3.3k stars 365 forks source link

Add cuda arg to _build_combine #1194

Closed ianthomas23 closed 1 year ago

ianthomas23 commented 1 year ago

This PR adds a new boolean cuda argument to the Reduction._build_combine function. This function (overridden in derived classes) returns a function that is used to combine the aggregations of multiple dask partitions.

There is no change in functionality here, just a simplification of where._build_combine which is currently the only code that has different combine behaviour depending of whether the calculations are occurring on the CPU or GPU. But the change is required for the upcoming CUDA mutex PRs which behave differently depending on the new cuda argument.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1194 (8f822cc) into main (206e8c6) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1194   +/-   ##
=======================================
  Coverage   85.48%   85.48%           
=======================================
  Files          35       35           
  Lines        8232     8232           
=======================================
  Hits         7037     7037           
  Misses       1195     1195           
Impacted Files Coverage Δ
datashader/compiler.py 95.74% <100.00%> (ø)
datashader/reductions.py 86.17% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more