kimikage / ColorBlendModes.jl

blend modes such as multiply, screen, overlay and so on.
MIT License
4 stars 0 forks source link

Specialize the linear interpolation for `N0f8` and `N0f16` #39

Closed kimikage closed 2 years ago

kimikage commented 2 years ago

This can be a workaround for the LLVM error "ran out of registers during register allocation"。

julia> a = ARGB32.(rand(ARGB, 1000, 1000));

julia> b = ARGB32.(rand(ARGB, 1000, 1000));

julia> @btime BlendMultiply.($a, $b);
  59.620 ms (2 allocations: 3.81 MiB) # before
  20.005 ms (2 allocations: 3.81 MiB) # after
codecov[bot] commented 2 years ago

Codecov Report

Merging #39 (b23370a) into master (3529b12) will increase coverage by 0.02%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
+ Coverage   96.27%   96.29%   +0.02%     
==========================================
  Files           7        6       -1     
  Lines         295      297       +2     
==========================================
+ Hits          284      286       +2     
  Misses         11       11              
Impacted Files Coverage Δ
src/operations.jl 96.07% <100.00%> (+0.10%) :arrow_up:
src/ColorBlendModes.jl

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 3529b12...b23370a. Read the comment docs.