-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues with A_mul_Bc, Ac_mul_B and constructor for CholmodSparse.…
… Remove support for single precision types and ssmult for matrices with complex entries. Added tests for Cholmod issue #9160. (cherry picked from commit 877a29c) Conflicts: base/linalg/cholmod.jl test/runtests.jl Add jl_cholmod_sizeof_long to SuiteSparse_wrapper. Select supported index types based on size of SuitSparse_long. Test adjusted. (cherry picked from commit 5f333b1)
- Loading branch information
Showing
5 changed files
with
142 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using Base.Test | ||
|
||
let # Issue 9160 | ||
const CHOLMOD = Base.LinAlg.CHOLMOD | ||
|
||
for Ti in CHOLMOD.CHMITypes.types | ||
for elty in CHOLMOD.CHMVRealTypes.types | ||
|
||
A = sprand(10,10,0.1) | ||
A = convert(SparseMatrixCSC{elty,Ti},A) | ||
cmA = CHOLMOD.CholmodSparse(A) | ||
|
||
B = sprand(10,10,0.1) | ||
B = convert(SparseMatrixCSC{elty,Ti},B) | ||
cmB = CHOLMOD.CholmodSparse(B) | ||
|
||
# Ac_mul_B | ||
@test_approx_eq sparse(cmA'*cmB) A'*B | ||
|
||
# A_mul_Bc | ||
@test_approx_eq sparse(cmA*cmB') A*B' | ||
|
||
# A_mul_Ac | ||
@test_approx_eq sparse(cmA*cmA') A*A' | ||
|
||
# Ac_mul_A | ||
@test_approx_eq sparse(cmA'*cmA) A'*A | ||
|
||
# A_mul_Ac for symmetric A | ||
A = 0.5*(A + A') | ||
cmA = CHOLMOD.CholmodSparse(A) | ||
@test_approx_eq sparse(cmA*cmA') A*A' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters