Skip to content

Commit

Permalink
[GPU] Update the error message
Browse files Browse the repository at this point in the history
  • Loading branch information
amontoison committed Oct 10, 2022
1 parent c7902ed commit c88e3e2
Show file tree
Hide file tree
Showing 33 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions src/bicgstab.jl
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ function bicgstab!(solver :: BicgstabSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :t , S, n)
Expand Down
4 changes: 2 additions & 2 deletions src/bilq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ function bilq!(solver :: BilqSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Ab

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
4 changes: 2 additions & 2 deletions src/bilqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ function bilqr!(solver :: BilqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c ::

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/cg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function cg!(solver :: CgSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :z, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/cg_lanczos.jl
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function cg_lanczos!(solver :: CgLanczosSolver{T,FC,S}, A, b :: AbstractVector{F

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $T")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :v, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/cg_lanczos_shift.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function cg_lanczos_shift!(solver :: CgLanczosShiftSolver{T,FC,S}, A, b :: Abstr

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :v, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/cgls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function cgls!(solver :: CglsSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/cgne.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function cgne!(solver :: CgneSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
4 changes: 2 additions & 2 deletions src/cgs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ function cgs!(solver :: CgsSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Abst

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :vw, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/cr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ function cr!(solver :: CrSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace
allocate_if(!MisI, solver, :Mq, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/craig.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function craig!(solver :: CraigSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/craigmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function craigmr!(solver :: CraigmrSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/crls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function crls!(solver :: CrlsSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/crmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function crmr!(solver :: CrmrSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/diom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function diom!(solver :: DiomSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :w, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/dqgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function dqgmres!(solver :: DqgmresSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :w, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/fgmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function fgmres!(solver :: FgmresSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI , solver, :q , S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/fom.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function fom!(solver :: FomSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI , solver, :q , S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/gmres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ function gmres!(solver :: GmresSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI , solver, :q , S, n)
Expand Down
4 changes: 2 additions & 2 deletions src/gpmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ function gpmr!(solver :: GpmrSolver{T,FC,S}, A, B, b :: AbstractVector{FC}, c ::
# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
eltype(B) == FC || error("eltype(B) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Determine λ and μ associated to generalized saddle point systems.
gsp &&= one(FC) ; μ = zero(FC))
Expand Down
2 changes: 1 addition & 1 deletion src/lnlq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function lnlq!(solver :: LnlqSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/lslq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function lslq!(solver :: LslqSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/lsmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ function lsmr!(solver :: LsmrSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/lsqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function lsqr!(solver :: LsqrSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/minres.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function minres!(solver :: MinresSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :v, S, n)
Expand Down
2 changes: 1 addition & 1 deletion src/minres_qlp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function minres_qlp!(solver :: MinresQlpSolver{T,FC,S}, A, b :: AbstractVector{F

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :vₖ, S, n)
Expand Down
4 changes: 2 additions & 2 deletions src/qmr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ function qmr!(solver :: QmrSolver{T,FC,S}, A, b :: AbstractVector{FC}; c :: Abst

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
2 changes: 1 addition & 1 deletion src/symmlq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function symmlq!(solver :: SymmlqSolver{T,FC,S}, A, b :: AbstractVector{FC};

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")

# Set up workspace.
allocate_if(!MisI, solver, :v, S, n)
Expand Down
4 changes: 2 additions & 2 deletions src/tricg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@ function tricg!(solver :: TricgSolver{T,FC,S}, A, b :: AbstractVector{FC}, c ::

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Determine τ and ν associated to SQD, SPD or SND systems.
flip &&= -one(T) ; ν = one(T))
Expand Down
4 changes: 2 additions & 2 deletions src/trilqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ function trilqr!(solver :: TrilqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
4 changes: 2 additions & 2 deletions src/trimr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ function trimr!(solver :: TrimrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c ::

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Determine τ and ν associated to SQD, SPD or SND systems.
flip &&= -one(T) ; ν = one(T))
Expand Down
4 changes: 2 additions & 2 deletions src/usymlq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ function usymlq!(solver :: UsymlqSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down
4 changes: 2 additions & 2 deletions src/usymqr.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ function usymqr!(solver :: UsymqrSolver{T,FC,S}, A, b :: AbstractVector{FC}, c :

# Check type consistency
eltype(A) == FC || error("eltype(A) ≠ $FC")
ktypeof(b) <: S || error("ktypeof(b) $S")
ktypeof(c) <: S || error("ktypeof(c) $S")
ktypeof(b) <: S || error("ktypeof(b) is not a subtype of $S")
ktypeof(c) <: S || error("ktypeof(c) is not a subtype of $S")

# Compute the adjoint of A
Aᴴ = A'
Expand Down

0 comments on commit c88e3e2

Please sign in to comment.