diff --git a/Project.toml b/Project.toml index b4ded33..895f00e 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ authors = ["Tobias Knopp "] version = "0.6.0" [deps] +Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2" Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" DistributedArrays = "aaf54ef3-cdf8-58ed-94cc-d582ad619b94" @@ -25,6 +26,7 @@ Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" [compat] AbstractImageReconstruction = "0.3" +Adapt = "3, 4" DSP = "0.6, 0.7" Distributed = "1" DistributedArrays = "0.6" diff --git a/src/MPIReco.jl b/src/MPIReco.jl index 9d80cb8..a915eb4 100644 --- a/src/MPIReco.jl +++ b/src/MPIReco.jl @@ -5,6 +5,7 @@ module MPIReco @reexport using MPIFiles const shape = MPIFiles.shape using AbstractImageReconstruction + using Adapt @reexport using DSP using ProgressMeter using Unitful diff --git a/src/SystemMatrix/SystemMatrix.jl b/src/SystemMatrix/SystemMatrix.jl index 1b9375a..5acc348 100644 --- a/src/SystemMatrix/SystemMatrix.jl +++ b/src/SystemMatrix/SystemMatrix.jl @@ -67,9 +67,7 @@ end function process(t::Type{<:AbstractMPIRecoAlgorithm}, params::DenseSystemMatixLoadingParameter, sf::MPIFile, frequencies::Vector{CartesianIndex{2}}) S, grid = getSF(sf, frequencies, nothing; toKwargs(params)...) @info "Loading SM" - if !isa(S, params.arrayType) - S = params.arrayType(S) - end + S = adapt(params.arrayType, S) return S, grid end