ArrayInterface.jl icon indicating copy to clipboard operation
ArrayInterface.jl copied to clipboard

Support "known" methods in ArrayInterfaceCore

Open Tokazama opened this issue 3 years ago • 1 comments

I'm not sure if/when we'll get Base support for StaticInt but it would be nice if everybody at least had the tools to support the most of the stride layout irrelevant of that decision going forward. This attempts to get all the "known" traits into the core package. If this looks good we might be able to figure out how to work this into the size, length, offsets and strides methods here so it's easier to support those without a direct dependency on ArrayInterface for those hesitant about Static.jl

The downside to this is that we can't fall back to axes_types to extract information, which requires manually defining more methods and might even be breaking. I figured it was worth trying anyway because at the very least it will demonstrate that we really have tried everything to get around StaticInt.

Tokazama avatar Jul 25 '22 20:07 Tokazama

Codecov Report

Merging #335 (870ceef) into master (bf07fa9) will decrease coverage by 0.70%. The diff coverage is 58.33%.

@@            Coverage Diff             @@
##           master     #335      +/-   ##
==========================================
- Coverage   90.06%   89.36%   -0.71%     
==========================================
  Files           9        9              
  Lines        1319     1175     -144     
==========================================
- Hits         1188     1050     -138     
+ Misses        131      125       -6     
Impacted Files Coverage Δ
src/dimensions.jl 94.39% <ø> (+0.82%) :arrow_up:
src/size.jl 95.45% <ø> (+3.56%) :arrow_up:
src/stridelayout.jl 88.72% <ø> (-0.80%) :arrow_down:
src/axes.jl 89.92% <33.33%> (-2.11%) :arrow_down:
src/ArrayInterface.jl 83.62% <57.14%> (-1.71%) :arrow_down:
src/array_index.jl 100.00% <100.00%> (ø)
src/ranges.jl 91.95% <0.00%> (-0.51%) :arrow_down:

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov[bot] avatar Jul 25 '22 20:07 codecov[bot]