Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare split of AbstractQ and AbstractMatrix #41

Merged
merged 2 commits into from
Feb 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "JOLI"
uuid = "bb331ad6-a1cf-11e9-23da-9bcb53c69f6f"
authors = ["Henryk Modzelewski <[email protected]>"]
version = "0.8.2"
version = "0.8.3"

[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Expand Down
2 changes: 1 addition & 1 deletion src/JOLI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ import Base.getindex


# what's imported from LinearAlgebra
import LinearAlgebra.norm
import LinearAlgebra.norm, LinearAlgebra.AbstractQ
import LinearAlgebra.issymmetric, LinearAlgebra.ishermitian
import LinearAlgebra.mul!, LinearAlgebra.ldiv!

Expand Down
2 changes: 1 addition & 1 deletion src/joAbstractDAparallelLinearOperator/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create a linear operator working on 2D DArray in multi-vector (over 2nd dimensio

"""
function joDAdistributedLinOp(A::joAbstractLinearOperator{DDT,RDT},psin::joPAsetup,
fclean::Bool=false,rclean::Bool=false) where {DDT<:Number,RDT<:Number,INT<:Integer}
fclean::Bool=false,rclean::Bool=false) where {DDT<:Number,RDT<:Number}

psin.chunks[1]==1 || throw(joDAdistributedLinearOperatorException("joDAdistributedLinearOperator: invalid joPAsetup - must not be distributed in 1st dimension"))
A.n==psin.dims[1] || throw(joDAdistributedLinearOperatorException("joDAdistributedLinearOperator: invalid joPAsetup - 1st dimension off joPAsetup does not match size(A,2)"))
Expand Down
4 changes: 2 additions & 2 deletions src/joAbstractLinearOperator/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""
joMatrix outer constructor

joMatrix(array::AbstractMatrix;
joMatrix(array::Union{AbstractMatrix,AbstractQ};
DDT::DataType=eltype(array),
RDT::DataType=promote_type(eltype(array),DDT),
name::String="joMatrix")
Expand All @@ -26,7 +26,7 @@ Look up argument names in help to joMatrix type.
- if RDT:<Real for complex matrix then imaginary part will be neglected for forward/conjugate operator

"""
function joMatrix(array::AbstractMatrix{EDT};
function joMatrix(array::Union{AbstractMatrix{EDT},AbstractQ{EDT}};
DDT::DataType=EDT,RDT::DataType=promote_type(EDT,DDT),name::String="joMatrix") where {EDT}

(typeof(array)<:DArray || typeof(array)<:SharedArray) && @warn "Creating joMatrix from non-local array like $(typeof(array)) is likely going to have adverse impact on JOLI's health. Please, avoid it."
Expand Down
2 changes: 1 addition & 1 deletion src/joAbstractSAparallelLinearOperator/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Create a linear operator working on 2D SharedArray in multi-vector (over 2nd dim

"""
function joSAdistributedLinOp(A::joAbstractLinearOperator{DDT,RDT},psin::joPAsetup,
fclean::Bool=false,rclean::Bool=false) where {DDT<:Number,RDT<:Number,INT<:Integer}
fclean::Bool=false,rclean::Bool=false) where {DDT<:Number,RDT<:Number}

psin.chunks[1]==1 || throw(joSAdistributedLinearOperatorException("joSAdistributedLinearOperator: invalid joPAsetup - must not be distributed in 1st dimension"))
A.n==psin.dims[1] || throw(joSAdistributedLinearOperatorException("joSAdistributedLinearOperator: invalid joPAsetup - 1st dimension off joPAsetup does not match size(A,2)"))
Expand Down
3 changes: 1 addition & 2 deletions src/joMiscTypesMethods/joPAsetup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ Creates joPAsetup type - basic 1D distribution
"""
function joPAsetup(wpool::WorkerPool,n::Integer;
DT::DataType=joFloat,
name::String="joPAsetup",
) where INT<:Integer
name::String="joPAsetup")
n>0 || throw(joPAsetupException("joPAsetup: invalid lenght of the vector: $n"))
dims=(n,)
chunks=joPAsetup_etc.default_chunks(dims,sort(workers(wpool)))
Expand Down