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

use buffer in BatchView #157

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

use buffer in BatchView #157

wants to merge 4 commits into from

Conversation

CarloLucibello
Copy link
Member

fix #156

This covers only BatchView(...; collate=nothing), I'm not sure how collate=true and collate=false should interact with the buffer so I won't address that here.

@codecov-commenter
Copy link

codecov-commenter commented May 19, 2023

Codecov Report

Merging #157 (661f09e) into main (2677a73) will increase coverage by 0.11%.
The diff coverage is 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   88.46%   88.57%   +0.11%     
==========================================
  Files          13       15       +2     
  Lines         598      604       +6     
==========================================
+ Hits          529      535       +6     
  Misses         69       69              
Impacted Files Coverage Δ
src/batchview.jl 82.35% <100.00%> (+1.50%) ⬆️

... and 2 files with indirect coverage changes

@ToucheSir ToucheSir requested review from lorenzoh and removed request for ToucheSir May 21, 2023 21:33
Copy link
Contributor

@ToucheSir ToucheSir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, though I've pulled in Lorenz to answer the questions posed.

src/batchview.jl Outdated Show resolved Hide resolved
src/batchview.jl Outdated Show resolved Hide resolved
# This collate=true specialization doesn't seem to be particularly useful, use collate=nothing instead.
function _getbatch!(buffer, A::BatchView{<:Any, <:Any, Val{true}}, obsindices)
for (i, idx) in enumerate(obsindices)
getobs!(buffer[i], A.data, idx)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why this isn't

Suggested change
getobs!(buffer[i], A.data, idx)
getobs!(buffer, A.data, idx)

Can you explain how it works to me briefly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getobs!(buffer, data::BatchView, idx) ignores buffer
3 participants