Skip to content

deque,vector: Remove bounds check in operator[]#185

Merged
stotko merged 1 commit intomasterfrom
deque_vector_bounds_check
Jun 3, 2020
Merged

deque,vector: Remove bounds check in operator[]#185
stotko merged 1 commit intomasterfrom
deque_vector_bounds_check

Conversation

@stotko
Copy link
Owner

@stotko stotko commented Jun 2, 2020

operator[] should not perform bounds checks. Remove these checks by making at() call operator[] rather than the other way around.

Fixes #184

@stotko stotko added this to the 1.4.0 milestone Jun 2, 2020
@stotko
Copy link
Owner Author

stotko commented Jun 2, 2020

The CI service seems to be broken. Waiting for this to be fixed before merging.

@codecov
Copy link

codecov bot commented Jun 3, 2020

Codecov Report

Merging #185 into master will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #185      +/-   ##
==========================================
- Coverage   97.87%   97.81%   -0.06%     
==========================================
  Files          28       28              
  Lines        1833     1832       -1     
==========================================
- Hits         1794     1792       -2     
- Misses         39       40       +1     
Impacted Files Coverage Δ
src/stdgpu/impl/deque_detail.cuh 93.53% <100.00%> (-0.04%) ⬇️
src/stdgpu/impl/vector_detail.cuh 93.87% <100.00%> (ø)
src/stdgpu/impl/unordered_base_detail.cuh 96.50% <0.00%> (-0.25%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a707e2...07198b9. Read the comment docs.

@stotko stotko merged commit 4caa0f4 into master Jun 3, 2020
@stotko stotko deleted the deque_vector_bounds_check branch June 3, 2020 08:53
@stotko stotko modified the milestones: 1.4.0, 2.0.0 Sep 28, 2020
@stotko stotko added bug and removed enhancement labels May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement at() in terms of operator[] to avoid bound checks in deque and vector

1 participant