Skip to content

Commit 5d3d7e1

Browse files
add GrB_ALL type
1 parent c4d4b92 commit 5d3d7e1

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

src/Operations/Assign.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),u)
6767
I::Y, # row indices
6868
ni::X, # number of row indices
6969
desc::V # descriptor for w and mask
70-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: Union{Vector{X}, GrB_ALL_Type}}
70+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_indices_types}
7171

7272
return GrB_Info(
7373
ccall(
@@ -123,7 +123,7 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),A)
123123
J::Y, # column indices
124124
nj::X, # number of column indices
125125
desc::V # descriptor for C, Mask, and A
126-
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: Union{Vector{X}, GrB_ALL_Type}}
126+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_indices_types}
127127

128128
return GrB_Info(
129129
ccall(
@@ -183,7 +183,7 @@ function GrB_Col_assign( # C<mask>(I,j) = accum (C(I,j),u)
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, S <: Union{Vector{X}, GrB_ALL_Type}}
186+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, S <: valid_indices_types}
187187

188188
return GrB_Info(
189189
ccall(
@@ -243,7 +243,7 @@ function GrB_Row_assign( # C<mask'>(i,J) = accum (C(i,J),u')
243243
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, S <: Union{Vector{X}, GrB_ALL_Type}}
246+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, S <: valid_indices_types}
247247

248248
return GrB_Info(
249249
ccall(
@@ -286,7 +286,7 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
286286
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, S <: Union{Vector{X}, GrB_ALL_Type}}
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 <: valid_indices_types}
290290

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

@@ -308,7 +308,7 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
308308
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, S <: Union{Vector{X}, GrB_ALL_Type}}
311+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: valid_indices_types}
312312

313313
return GrB_Info(
314314
ccall(
@@ -328,7 +328,7 @@ function GrB_Vector_assign( # w<mask>(I) = accum (w(I),x)
328328
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, S <: Union{Vector{X}, GrB_ALL_Type}}
331+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: valid_indices_types}
332332

333333
return GrB_Info(
334334
ccall(
@@ -373,7 +373,7 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
373373
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, S <: Union{Vector{X}, GrB_ALL_Type}}
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 <: valid_indices_types}
377377

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

@@ -397,7 +397,7 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
397397
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, S <: Union{Vector{X}, GrB_ALL_Type}}
400+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: valid_indices_types}
401401

402402
return GrB_Info(
403403
ccall(
@@ -419,7 +419,7 @@ function GrB_Matrix_assign( # C<Mask>(I,J) = accum (C(I,J),x)
419419
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, S <: Union{Vector{X}, GrB_ALL_Type}}
422+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_types, S <: valid_indices_types}
423423

424424
return GrB_Info(
425425
ccall(

src/Operations/Extract.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function GrB_Vector_extract( # w<mask> = accum (w, u(I))
7676
I::Y, # row indices
7777
ni::X, # number of row indices
7878
desc::V # descriptor for w and mask
79-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: Union{Vector{X}, GrB_ALL_Type}}
79+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_indices_types}
8080

8181
return GrB_Info(
8282
ccall(
@@ -156,7 +156,7 @@ function GrB_Matrix_extract( # C<Mask> = accum (C, A(I,J))
156156
J::Y, # column indices
157157
nj::X, # number of column indices
158158
desc::V # descriptor for C, Mask, and A
159-
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: Union{Vector{X}, GrB_ALL_Type}}
159+
) where {T <: valid_matrix_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_indices_types}
160160

161161
return GrB_Info(
162162
ccall(
@@ -244,7 +244,7 @@ function GrB_Col_extract( # w<mask> = accum (w, A(I,j))
244244
ni::X, # number of row indices
245245
j::X, # column index
246246
desc::V # descriptor for w, mask, and A
247-
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: Union{Vector{X}, GrB_ALL_Type}}
247+
) where {T <: valid_vector_mask_types, U <: valid_accum_types, V <: valid_desc_types, X <: GrB_Index, Y <: valid_indices_types}
248248

249249
return GrB_Info(
250250
ccall(

src/SuiteSparseGraphBLAS.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ valid_matrix_mask_types = Union{GrB_Matrix, GrB_NULL_Type}
5858
valid_vector_mask_types = Union{GrB_Vector, GrB_NULL_Type}
5959
valid_accum_types = Union{GrB_BinaryOp, GrB_NULL_Type}
6060
valid_desc_types = Union{GrB_Descriptor, GrB_NULL_Type}
61+
valid_indices_types = Union{Vector{<:GrB_Index}, GrB_ALL_Type}
6162

6263
const GrB_NULL = GrB_NULL_Type(C_NULL)
6364
const GrB_ALL = GrB_ALL_Type(C_NULL)

0 commit comments

Comments
 (0)