@@ -6,7 +6,7 @@ function _unpackdensematrix!(
6
6
desc = _handledescriptor (desc)
7
7
Csize = Ref {LibGraphBLAS.GrB_Index} (length (A) * sizeof (T))
8
8
values = Ref {Ptr{Cvoid}} (C_NULL )
9
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
9
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
10
10
@wraperror LibGraphBLAS. GxB_Matrix_unpack_FullC (
11
11
A,
12
12
values,
@@ -32,7 +32,7 @@ function _unpackdensematrix!(
32
32
desc = _handledescriptor (desc)
33
33
Csize = Ref {LibGraphBLAS.GrB_Index} (length (A) * sizeof (T))
34
34
values = Ref {Ptr{Cvoid}} (C_NULL )
35
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
35
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
36
36
@wraperror LibGraphBLAS. GxB_Matrix_unpack_FullC (
37
37
A,
38
38
values,
@@ -60,7 +60,7 @@ function _unpackdensematrixR!(
60
60
desc = _handledescriptor (desc)
61
61
Csize = Ref {LibGraphBLAS.GrB_Index} (length (A) * sizeof (T))
62
62
values = Ref {Ptr{Cvoid}} (C_NULL )
63
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
63
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
64
64
@wraperror LibGraphBLAS. GxB_Matrix_unpack_FullR (
65
65
A,
66
66
values,
@@ -91,7 +91,7 @@ function _unpackcscmatrix!(
91
91
colptrsize = Ref {LibGraphBLAS.GrB_Index} ()
92
92
rowidxsize = Ref {LibGraphBLAS.GrB_Index} ()
93
93
valsize = Ref {LibGraphBLAS.GrB_Index} ()
94
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
94
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
95
95
isjumbled = C_NULL
96
96
nnonzeros = nnz (A)
97
97
@wraperror LibGraphBLAS. GxB_Matrix_unpack_CSC (
@@ -106,6 +106,7 @@ function _unpackcscmatrix!(
106
106
isjumbled,
107
107
desc
108
108
)
109
+ isiso == C_NULL && (isiso = false )
109
110
colptr = unsafe_wrap (Array, Ptr {Int64} (colptr[]), size (A, 2 ) + 1 )
110
111
rowidx = unsafe_wrap (Array, Ptr {Int64} (rowidx[]), nnonzeros)
111
112
nstored = isiso[] ? 1 : nnonzeros
@@ -141,7 +142,7 @@ function _unpackcsrmatrix!(
141
142
rowptrsize = Ref {LibGraphBLAS.GrB_Index} ()
142
143
colidxsize = Ref {LibGraphBLAS.GrB_Index} ()
143
144
valsize = Ref {LibGraphBLAS.GrB_Index} ()
144
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
145
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
145
146
isjumbled = C_NULL
146
147
nnonzeros = nnz (A)
147
148
@wraperror LibGraphBLAS. GxB_Matrix_unpack_CSR (
@@ -156,6 +157,7 @@ function _unpackcsrmatrix!(
156
157
isjumbled,
157
158
desc
158
159
)
160
+ isiso == C_NULL && (isiso = false )
159
161
rowptr = unsafe_wrap (Array, Ptr {Int64} (rowptr[]), size (A, 1 ) + 1 )
160
162
colidx = unsafe_wrap (Array, Ptr {Int64} (colidx[]), nnonzeros)
161
163
nstored = isiso[] ? 1 : nnonzeros
@@ -190,7 +192,7 @@ function _unpackbitmapmatrix!(
190
192
Bsize = Ref {LibGraphBLAS.GrB_Index} (length (A) * sizeof (Bool))
191
193
values = Ref {Ptr{Cvoid}} (C_NULL )
192
194
bytemap = Ref {Ptr{Int8}} (C_NULL )
193
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
195
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
194
196
nnonzeros = Ref {LibGraphBLAS.GrB_Index} (nnz (A))
195
197
@wraperror LibGraphBLAS. GxB_Matrix_unpack_BitmapC (
196
198
A,
@@ -202,6 +204,7 @@ function _unpackbitmapmatrix!(
202
204
nnonzeros,
203
205
desc
204
206
)
207
+ isiso == C_NULL && (isiso = false )
205
208
nstored = isiso[] ? 1 : szA
206
209
v = unsafe_wrap (Array, Ptr {T} (values[]), nstored)
207
210
b = unsafe_wrap (Array, Ptr {Bool} (bytemap[]), szA)
@@ -226,7 +229,7 @@ function _unpackbitmapmatrixR!(
226
229
Bsize = Ref {LibGraphBLAS.GrB_Index} (length (A) * sizeof (Int8))
227
230
values = Ref {Ptr{Cvoid}} (C_NULL )
228
231
bytemap = Ref {Ptr{Int8}} (C_NULL )
229
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
232
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
230
233
nonzeros = Ref {LibGraphBLAS.GrB_Index} (0 )
231
234
@wraperror LibGraphBLAS. GxB_Matrix_unpack_BitmapR (
232
235
A,
@@ -238,6 +241,7 @@ function _unpackbitmapmatrixR!(
238
241
nonzeros,
239
242
desc
240
243
)
244
+ isiso == C_NULL && (isiso = false )
241
245
nstored = isiso[] ? 1 : szA
242
246
v = unsafe_wrap (Array, Ptr {T} (values[]), nstored)
243
247
b = unsafe_wrap (Array, bytemap[], szA)
@@ -266,7 +270,7 @@ function _unpackhypermatrix!(
266
270
rowidxsize = Ref {LibGraphBLAS.GrB_Index} ()
267
271
valsize = Ref {LibGraphBLAS.GrB_Index} ()
268
272
nvec = Ref {LibGraphBLAS.GrB_Index} ()
269
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
273
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
270
274
isjumbled = C_NULL
271
275
nnonzeros = nnz (A)
272
276
@@ -285,6 +289,7 @@ function _unpackhypermatrix!(
285
289
isjumbled,
286
290
desc
287
291
)
292
+ isiso == C_NULL && (isiso = false )
288
293
nvec = nvec[]
289
294
colptr = unsafe_wrap (Array, Ptr {Int64} (colptr[]), nvec + 1 )
290
295
colidx = unsafe_wrap (Array, Ptr {Int64} (colidx), nvec)
@@ -329,7 +334,7 @@ desc = _handledescriptor(desc)
329
334
colidxsize = Ref {LibGraphBLAS.GrB_Index} ()
330
335
valsize = Ref {LibGraphBLAS.GrB_Index} ()
331
336
nvec = Ref {LibGraphBLAS.GrB_Index} ()
332
- isiso = Ref {Bool} (allowiso ? true : C_NULL )
337
+ isiso = allowiso ? Ref {Bool} (true ) : C_NULL
333
338
isjumbled = C_NULL
334
339
nnonzeros = nnz (A)
335
340
@@ -348,6 +353,7 @@ desc = _handledescriptor(desc)
348
353
isjumbled,
349
354
desc
350
355
)
356
+ isiso == C_NULL && (isiso = false )
351
357
nvec = nvec[]
352
358
rowptr = unsafe_wrap (Array, Ptr {Int64} (rowptr[]), nvec + 1 )
353
359
rowidx = unsafe_wrap (Array, Ptr {Int64} (rowidx[]), nvec)
0 commit comments