Skip to content

Commit

Permalink
remove specialization
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Jun 26, 2024
1 parent 797a0e5 commit deb63ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/batchview.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,22 +139,22 @@ Base.@propagate_inbounds function Base.getindex(A::BatchView, i)
_getbatch(A, obsindices)
end

function _getbatch(A::BatchView{TElem, TData, Val{true}}, obsindices) where {TElem, TData}
function _getbatch(A::BatchView{<:Any, <:Any, Val{true}}, obsindices)
batch([getobs(A.data, i) for i in obsindices])
end
function _getbatch(A::BatchView{TElem, TData, Val{false}}, obsindices) where {TElem, TData}
function _getbatch(A::BatchView{<:Any, <:Any, Val{false}}, obsindices)
return [getobs(A.data, i) for i in obsindices]
end
function _getbatch(A::BatchView{TElem, TData, Val{nothing}}, obsindices) where {TElem, TData}
function _getbatch(A::BatchView{<:Any, <:Any, Val{nothing}}, obsindices)
getobs(A.data, obsindices)
end

function getobs!(buffer, A::BatchView{TElem, TData, Val{nothing}}, i) where {TElem, TData}
function getobs!(buffer, A::BatchView{<:Any, <:Any, Val{nothing}}, i)
obsindices = _batchindexes(A, i)
return _getbatch!(buffer, A, obsindices)
end

function _getbatch!(buffer, A::BatchView{TElem, TData, Val{nothing}}, obsindices) where {TElem, TData}
function _getbatch!(buffer, A::BatchView{<:Any, <:Any, Val{nothing}}, obsindices)
return getobs!(buffer, A.data, obsindices)
end

Expand Down

0 comments on commit deb63ef

Please sign in to comment.