Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU shift_and_insert function #1260

Merged
merged 1 commit into from Aug 1, 2023
Merged

CPU shift_and_insert function #1260

merged 1 commit into from Aug 1, 2023

Conversation

ianthomas23
Copy link
Member

Refactor of *_n reductions such as max_n so that all shift and insert functionality is in a single shift_and_insert function rather than repeated across the codebase. The new function takes a 1D array of length n (the n of the max_n or similar), the value to insert and the index to insert at. The function shifts alongs values from index onwards one along the array and inserts the value.

This is CPU only, GPU equivalent will follow in a separate PR.

@ianthomas23 ianthomas23 added this to the v0.15.2 milestone Jul 31, 2023
@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #1260 (55de7b3) into main (81260ca) will decrease coverage by 0.02%.
The diff coverage is 94.73%.

@@            Coverage Diff             @@
##             main    #1260      +/-   ##
==========================================
- Coverage   83.49%   83.48%   -0.02%     
==========================================
  Files          35       35              
  Lines        8955     8931      -24     
==========================================
- Hits         7477     7456      -21     
+ Misses       1478     1475       -3     
Files Changed Coverage Δ
datashader/reductions.py 78.05% <87.50%> (-0.09%) ⬇️
datashader/utils.py 82.71% <100.00%> (-0.20%) ⬇️

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

@ianthomas23 ianthomas23 merged commit 5196633 into holoviz:main Aug 1, 2023
15 of 16 checks passed
@ianthomas23 ianthomas23 deleted the shift_and_insert branch August 1, 2023 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant