Skip to content

Commit

Permalink
unroll the chunk picking
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC committed Aug 15, 2024
1 parent eb6f1bd commit 330440e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prelude.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct Chunk{N} end

function Chunk(input_length::Integer, threshold::Integer = DEFAULT_CHUNK_THRESHOLD)
N = pickchunksize(input_length, threshold)
return Chunk{N}()
Base.@nif 12 d->(N == d) d->(Chunk{d}()) d->(Chunk{N}())
end

function Chunk(x::AbstractArray, threshold::Integer = DEFAULT_CHUNK_THRESHOLD)
Expand Down

0 comments on commit 330440e

Please sign in to comment.