Skip to content

Commit

Permalink
Merge pull request #93 from aminnj/nonjagged-optim
Browse files Browse the repository at this point in the history
  • Loading branch information
aminnj authored Sep 10, 2021
2 parents fe11279 + 6548071 commit 00d661a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/root.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ function interped_data(rawdata, rawoffsets, ::Type{T}, ::Type{J}) where {T, J<:J
# the other is where we need to auto detector T bsaed on class name
# we want the fundamental type as `reinterpret` will create vector
if J == Nojagg
return map(ntoh, reinterpret(T, rawdata))
return ntoh.(reinterpret(T, rawdata))
elseif J == Offsetjaggjagg # the branch is doubly jagged
jagg_offset = 10
subT = eltype(eltype(T))
Expand All @@ -213,7 +213,7 @@ function interped_data(rawdata, rawoffsets, ::Type{T}, ::Type{J}) where {T, J<:J
while cursor < length(flat)
n = ntoh(reinterpret(Int32, flat[cursor:cursor+sizeof(Int32)-1])[1])
cursor += sizeof(Int32)
b = map(ntoh, reinterpret(subT, flat[cursor:cursor+n*sizeof(subT)-1]))
b = ntoh.(reinterpret(subT, flat[cursor:cursor+n*sizeof(subT)-1]))
cursor += n*sizeof(subT)
push!(row, b)
end
Expand Down Expand Up @@ -252,7 +252,7 @@ function interped_data(rawdata, rawoffsets, ::Type{T}, ::Type{J}) where {T, J<:J
real_data = ntoh.(reinterpret(T, rawdata))
offset .÷= _size
offset .+= 1
VectorOfVectors(real_data, offset)
return VectorOfVectors(real_data, offset)
end
end

Expand Down

0 comments on commit 00d661a

Please sign in to comment.