Skip to content

Commit 42ca4e5

Browse files
bug fixes
1 parent 659ea3c commit 42ca4e5

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

src/Operations/Assign.jl

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,11 @@ function GrB_Col_assign( # C<mask>(I,j) = accum (C(I,j),u)
179179
mask::T, # optional mask for C(:,j), unused if NULL
180180
accum::U, # optional accum for z=accum(C(I,j),t)
181181
u::GrB_Vector, # input vector
182-
I::Vector{X}, # row indices
182+
I::S, # row indices
183183
ni::X, # number of row indices
184184
j::X, # column index
185185
desc::V # descriptor for C(:,j) and mask
186-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index}
186+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, S <: Union{Vector{X}, GrB_ALL_Type}}
187187

188188
return GrB_Info(
189189
ccall(
@@ -240,10 +240,10 @@ function GrB_Row_assign( # C<mask'>(i,J) = accum (C(i,J),u')
240240
accum::U, # optional accum for z=accum(C(i,J),t)
241241
u::GrB_Vector, # input vector
242242
i::X, # row index
243-
J::Vector{X}, # column indices
243+
J::S, # column indices
244244
nj::X, # number of column indices
245245
desc::V # descriptor for C(i,:) and mask
246-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index}
246+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, S <: Union{Vector{X}, GrB_ALL_Type}}
247247

248248
return GrB_Info(
249249
ccall(
@@ -283,10 +283,10 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
283283
mask::T, # optional mask for w, unused if NULL
284284
accum::U, # optional accum for Z=accum(w(I),x)
285285
x::Z, # scalar to assign to w(I)
286-
I::Vector{X}, # row indices
286+
I::S, # row indices
287287
ni::X, # number of row indices
288288
desc::V # descriptor for w and mask
289-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_int_types, Z <: valid_types}
289+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_int_types, Z <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
290290

291291
fn_name = "GrB_Vector_assign_" * suffix(Z)
292292

@@ -305,10 +305,10 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
305305
mask::T, # optional mask for w, unused if NULL
306306
accum::U, # optional accum for Z=accum(w(I),x)
307307
x::Y, # scalar to assign to w(I)
308-
I::Vector{X}, # row indices
308+
I::S, # row indices
309309
ni::X, # number of row indices
310310
desc::V # descriptor for w and mask
311-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types}
311+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
312312

313313
return GrB_Info(
314314
ccall(
@@ -325,10 +325,10 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
325325
mask::T, # optional mask for w, unused if NULL
326326
accum::U, # optional accum for Z=accum(w(I),x)
327327
x::Y, # scalar to assign to w(I)
328-
I::Vector{X}, # row indices
328+
I::S, # row indices
329329
ni::X, # number of row indices
330330
desc::V # descriptor for w and mask
331-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types}
331+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
332332

333333
return GrB_Info(
334334
ccall(
@@ -368,12 +368,12 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
368368
Mask::T, # optional mask for C, unused if NULL
369369
accum::U, # optional accum for Z=accum(C(I,J),x)
370370
x::Z, # scalar to assign to C(I,J)
371-
I::Vector{X}, # row indices
371+
I::S, # row indices
372372
ni::X, # number of row indices
373-
J::Vector{X}, # column indices
373+
J::S, # column indices
374374
nj::X, # number of column indices
375375
desc::V # descriptor for C and Mask
376-
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_int_types, Z <: valid_types}
376+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_int_types, Z <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
377377

378378
fn_name = "GrB_Matrix_assign_" * suffix(Z)
379379

@@ -392,12 +392,12 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
392392
Mask::T, # optional mask for C, unused if NULL
393393
accum::U, # optional accum for Z=accum(C(I,J),x)
394394
x::Y, # scalar to assign to C(I,J)
395-
I::Vector{X}, # row indices
395+
I::S, # row indices
396396
ni::X, # number of row indices
397-
J::Vector{X}, # column indices
397+
J::S, # column indices
398398
nj::X, # number of column indices
399399
desc::V # descriptor for C and Mask
400-
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types}
400+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
401401

402402
return GrB_Info(
403403
ccall(
@@ -414,12 +414,12 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
414414
Mask::T, # optional mask for C, unused if NULL
415415
accum::U, # optional accum for Z=accum(C(I,J),x)
416416
x::Y, # scalar to assign to C(I,J)
417-
I::Vector{X}, # row indices
417+
I::S, # row indices
418418
ni::X, # number of row indices
419-
J::Vector{X}, # column indices
419+
J::S, # column indices
420420
nj::X, # number of column indices
421421
desc::V # descriptor for C and Mask
422-
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types}
422+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: Union{Vector{X}, GrB_ALL_Type}}
423423

424424
return GrB_Info(
425425
ccall(

src/SuiteSparseGraphBLAS.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function __init__()
103103
end
104104

105105
#load global binary operators
106-
GrB_LOR.p = load_global("GrB_LNOT")
106+
GrB_LOR.p = load_global("GrB_LOR")
107107
GrB_LAND.p = load_global("GrB_LAND")
108108
GrB_LXOR.p = load_global("GrB_LXOR")
109109

@@ -309,4 +309,7 @@ export GrB_NULL
309309
# GrB_ALL
310310
export GrB_ALL
311311

312+
# GrB_Index
313+
export GrB_Index
314+
312315
end #end of module

0 commit comments

Comments
 (0)