Skip to content

Commit 24f73ab

Browse files
committed
fix some docstrings, AMGCLWrap dependency
1 parent 41d23cc commit 24f73ab

File tree

4 files changed

+29
-17
lines changed

4 files changed

+29
-17
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ ExtendableSparseIncompleteLUExt = "IncompleteLU"
3131
ExtendableSparsePardisoExt = "Pardiso"
3232

3333
[compat]
34-
AMGCLWrap = "0.3.1,0.4"
34+
AMGCLWrap = "0.4"
3535
AlgebraicMultigrid = "0.4,0.5,0.6"
3636
DocStringExtensions = "0.8, 0.9"
3737
ILUZero = "0.2"

docs/src/internal.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ Pages = ["sparsematrixlnk.jl"]
1313
Modules = [ExtendableSparse]
1414
Pages = ["sparsematrixcsc.jl"]
1515
```
16+
## New API
17+
Under development - aimed at multithreading
18+
```@autodocs
19+
Modules = [ExtendableSparse]
20+
Pages = ["abstractsparsematrixextension.jl",
21+
"abstractextendablesparsematrixcsc.jl",
22+
"sparsematrixdilnkc.jl",
23+
"genericextendablesparsematrixcsc.jl",
24+
"genericmtextendablesparsematrixcsc.jl"]
25+
```
26+
1627

1728
## Misc methods
1829

src/matrix/abstractsparsematrixextension.jl

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,13 @@ Abstract type for sparse matrix extension.
55
66
Subtypes T_ext must implement:
77
8-
Constructor T_ext(m,n)
9-
SparseArrays.nnz(ext::T_ext)
10-
Base.size(ext::T_ext)
11-
12-
13-
Base.sum(extmatrices::Vector{T_ext}, csx)
14-
- Add csx matrix and extension matrices (one per partition) and return csx matrix
15-
16-
rawupdateindex!(ext::Text, op, v, i, j) where {Tv, Ti}
17-
- Set ext[i,j]+=v, possibly insert entry into matrix.
18-
19-
20-
Optional:
21-
22-
Base.+(ext::T_ext, csx)
23-
- Add extension matrix and csc/csr matrix, return csx matrix
8+
- Constructor `T_ext(m,n)`
9+
- `SparseArrays.nnz(ext::T_ext)`
10+
- `Base.size(ext::T_ext)`
11+
- `Base.sum(extmatrices::Vector{T_ext}, csx)`: add csr or csc matrix and extension matrices (one per partition) and return csx matrix
12+
- `Base.+(ext::T_ext, csx)` (optional) - Add extension matrix and csc/csr matrix, return csx matrix
13+
- `rawupdateindex!(ext::Text, op, v, i, j, tid) where {Tv, Ti}`: Set `ext[i,j]op=v`, possibly insert new entry into matrix. `tid` is a
14+
task or partition id
2415
2516
"""
2617
abstract type AbstractSparseMatrixExtension{Tv, Ti} <: AbstractSparseMatrix{Tv,Ti} end

src/matrix/sparsematrixdilnkc.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,11 @@ function SparseMatrixDILNKC(csc::SparseArrays.SparseMatrixCSC{Tv, Ti}) where {Tv
103103
lnk
104104
end
105105

106+
"""
107+
$(SIGNATURES)
108+
109+
Find index in matrix.
110+
"""
106111
function findindex(lnk::SparseMatrixDILNKC, i, j)
107112
if !((1 <= i <= lnk.m) & (1 <= j <= lnk.n))
108113
throw(BoundsError(lnk, (i, j)))
@@ -137,6 +142,11 @@ function Base.getindex(lnk::SparseMatrixDILNKC{Tv, Ti}, i, j) where {Tv, Ti}
137142
end
138143
end
139144

145+
"""
146+
$(SIGNATURES)
147+
148+
Add entry.
149+
"""
140150
function addentry!(lnk::SparseMatrixDILNKC, i, j, k, k0)
141151
# increase number of entries
142152
lnk.nentries += 1

0 commit comments

Comments
 (0)