Skip to content

WIP: enhance parent_call#248

Open
johnnychen94 wants to merge 2 commits intomasterfrom
jc/parent_call
Open

WIP: enhance parent_call#248
johnnychen94 wants to merge 2 commits intomasterfrom
jc/parent_call

Conversation

@johnnychen94
Copy link
Copy Markdown
Member

@johnnychen94 johnnychen94 commented Jun 21, 2021

  • rename it to no_offset_view_apply as a part of the non-exported API.
  • allow multiple inputs

I find this pattern used very widely when dealing with CUDA.CuArray,

julia> A = OffsetArray(CUDA.rand(4, 4), -1, -1);

julia> B = OffsetArray(CUDA.rand(4, 4), -1, -1);

julia> A .- B
ERROR: Scalar indexing is disallowed.

julia> no_offset_view_apply(A, B) do x, y
    x .- y
end # 🎉 
4×4 OffsetArray(::CuArray{Float32, 2}, 0:3, 0:3) with eltype Float32 with indices 0:3×0:3:

A lot of seemingly ambiguous operations can be supported by this, e.g., #93, #137

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 21, 2021

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.34%. Comparing base (7a43b4c) to head (da91a54).
⚠️ Report is 94 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
+ Coverage   95.26%   95.34%   +0.08%     
==========================================
  Files           5        5              
  Lines         422      430       +8     
==========================================
+ Hits          402      410       +8     
  Misses         20       20              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant