Skip to content

Commit

Permalink
Adding docstring for _select_strides.
Browse files Browse the repository at this point in the history
  • Loading branch information
codetalker7 committed Jul 25, 2024
1 parent 0968e25 commit 7a8ebb1
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/search/strided_tensor.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ function StridedTensor(packed_tensor::Vector{Int}, lengths::Vector{Int})
)
end

"""
_select_strides(lengths::Vector{Int}, quantiles::Vector{Float64})
Get candidate strides computed using `quantiles` from `lengths`.
# Arguments
- `lengths`: A vector of `ivf` lengths to select candidate stride lengths from.
- `quantiles`: The quantiles to be computed.
# Returns
A `Vector` containing the corresponding quantiles.
"""
function _select_strides(lengths::Vector{Int}, quantiles::Vector{Float64})
if length(lengths) < 5000
quantile(lengths, quantiles)
Expand Down

0 comments on commit 7a8ebb1

Please sign in to comment.