Skip to content

Commit

Permalink
Merge pull request #41 from dkarrasch/dk/abstractq
Browse files Browse the repository at this point in the history
Prepare split of `AbstractQ` and `AbstractMatrix`
  • Loading branch information
mloubout authored Feb 13, 2023
2 parents 9c2477f + 4399872 commit c1753b3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
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"

This comment has been minimized.

Copy link
@mloubout

mloubout Feb 13, 2023

Author Member

[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

1 comment on commit c1753b3

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/77591

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.3 -m "<description of version>" c1753b33890b72120b8fdacf8035180cc3dbc941
git push origin v0.8.3

Please sign in to comment.