diff --git a/Project.toml b/Project.toml index 14abbc3..c88b5a3 100644 --- a/Project.toml +++ b/Project.toml @@ -27,7 +27,7 @@ Zarr = "0a941bbe-ad1d-11e8-39d9-ab76183a1d99" Dagger = "0.18" Graphs = "1" Interpolations = "0.14, 0.15" -DiskArrays = "0.3, 0.4" +DiskArrays = "0.3, 0.4.10" Ipopt = "1" OffsetArrays = "1" OnlineStats = "1" diff --git a/devscripts/interptest.jl b/devscripts/interptest.jl index 743217f..ec92075 100644 --- a/devscripts/interptest.jl +++ b/devscripts/interptest.jl @@ -1,5 +1,5 @@ using DiskArrayEngine -using DiskArrays: ChunkType, RegularChunks +using DiskArrays: ChunkVector, RegularChunks using Statistics using Interpolations using Zarr, DiskArrays, OffsetArrays diff --git a/devscripts/maintest.jl b/devscripts/maintest.jl index 0dccdae..63e055e 100644 --- a/devscripts/maintest.jl +++ b/devscripts/maintest.jl @@ -1,6 +1,6 @@ using DiskArrayEngine const DAE = DiskArrayEngine -using DiskArrays: ChunkType, RegularChunks +using DiskArrays: ChunkVector, RegularChunks using Statistics using Zarr, DiskArrays using StatsBase: rle, mode diff --git a/src/executionplan.jl b/src/executionplan.jl index 33c6225..4e868a4 100644 --- a/src/executionplan.jl +++ b/src/executionplan.jl @@ -3,7 +3,7 @@ import OptimizationMOI, OptimizationOptimJL using DiskArrays: DiskArrays, eachchunk, arraysize_from_chunksize using Statistics: mean using StatsBase: mode -struct UndefinedChunks <: DiskArrays.ChunkType +struct UndefinedChunks <: DiskArrays.ChunkVector s::Int end Base.size(c::UndefinedChunks) = (1,) @@ -335,7 +335,7 @@ function find_adjust_candidates(optires,smax,intsizes;reltol_low=0.2,reltol_high return floor(Int,optires)//1 end -function generate_LoopRange(r_adj::Rational,apparent_chunks::ChunkType;tres=3) +function generate_LoopRange(r_adj::Rational,apparent_chunks::ChunkVector;tres=3) splitsize = ceil(Int,r_adj) all_ends = last.(apparent_chunks) firstend = findlast(<=(splitsize),all_ends) diff --git a/src/mwops.jl b/src/mwops.jl index ed89880..4c21de3 100644 --- a/src/mwops.jl +++ b/src/mwops.jl @@ -1,9 +1,9 @@ -using DiskArrays: DiskArrays, ChunkType, GridChunks, AbstractDiskArray +using DiskArrays: DiskArrays, ChunkVector, GridChunks, AbstractDiskArray using Zarr export InputArray, create_outwindows, GMDWop, create_outars internal_size(p) = last(last(p))-first(first(p))+1 -function steps_per_chunk(p,cs::ChunkType) +function steps_per_chunk(p,cs::ChunkVector) centers = map(x->(first(x)+last(x))/2,p) slen = sum(cs) do r i1 = searchsortedfirst(centers,first(r)) @@ -76,9 +76,9 @@ end mysub(ia,t) = map(li->t[li],getloopinds(ia)) -"Returns the full domain that a `DiskArrays.ChunkType` object covers as a unit range" +"Returns the full domain that a `DiskArrays.ChunkVector` object covers as a unit range" domain_from_chunktype(ct) = first(first(ct)):last(last(ct)) -"Returns the length of a dimension covered by a `DiskArrays.ChunkType` object" +"Returns the length of a dimension covered by a `DiskArrays.ChunkVector` object" length_from_chunktype(ct) = length(domain_from_chunktype(ct)) diff --git a/src/restart.jl b/src/restart.jl index b025dbd..cbd957a 100644 --- a/src/restart.jl +++ b/src/restart.jl @@ -60,9 +60,9 @@ function putitem(f::IO, lr::ProductArray) end function putitem(f::IO, g::DiskArrays.RegularChunks) write(f, K_RegularChunks) - write(f, g.cs) + write(f, g.chunksize) write(f, g.offset) - write(f, g.s) + write(f, g.arraysize) end function putitem(f::IO, g::DiskArrays.IrregularChunks) write(f, K_IrregularChunks)