File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change 1
1
struct GBIterator{O}
2
2
p:: Ref{LibGraphBLAS.GxB_Iterator}
3
+ A:: AbstractGBArray
4
+ function GBIterator (A:: AbstractGBArray )
5
+ # garbaage collection
6
+ i = Ref {LibGraphBLAS.GxB_Iterator} ()
7
+ @wraperror LibGraphBLAS. GxB_Iterator_new (i)
8
+ p = finalizer (iter) do ref
9
+ @wraperror LibGraphBLAS. GxB_Iterator_free (ref)
10
+ end
11
+ return new {storageorder(A)} (p, A)
12
+ end
3
13
end
4
14
gbpointer (I:: GBIterator ) = I. p[]
5
15
6
- function GBIterator (bycol= true ) # this should be removed eventually. We always want an attached one.
7
- i = Ref {LibGraphBLAS.GxB_Iterator} ()
8
- @wraperror LibGraphBLAS. GxB_Iterator_new (i)
9
- return GBIterator {} (finalizer (iter) do ref
10
- @wraperror LibGraphBLAS. GxB_Iterator_free (ref)
11
- end )
12
- end
13
-
14
- function attach (I:: GBIterator , A:: AbstractGBArray ; desc = nothing , itercolumns)
16
+ function _attach (I:: GBIterator{O} , A:: AbstractGBArray ; desc = nothing ) where {O}
15
17
desc = _handledescriptor (desc)
16
18
@wraperror LibGraphBLAS. GxB_Iterator_attach (gbpointer (I), gbpointer (A), desc)
17
19
end
You can’t perform that action at this time.
0 commit comments