@@ -15,6 +15,7 @@ typedef uint64_t GrB_Index;
15
15
/* GxB typedefs */
16
16
typedef double _Complex GxB_FC64_t ;
17
17
typedef float _Complex GxB_FC32_t ;
18
+ typedef struct GB_Iterator_opaque * GxB_Iterator ;
18
19
typedef struct GB_Scalar_opaque * GxB_Scalar ;
19
20
typedef struct GB_SelectOp_opaque * GxB_SelectOp ;
20
21
@@ -68,6 +69,7 @@ typedef enum
68
69
{
69
70
GrB_SUCCESS = 0 ,
70
71
GrB_NO_VALUE = 1 ,
72
+ GxB_EXHAUSTED = 2 ,
71
73
GrB_UNINITIALIZED_OBJECT = -1 ,
72
74
GrB_NULL_POINTER = -2 ,
73
75
GrB_INVALID_VALUE = -3 ,
@@ -3059,6 +3061,14 @@ extern GrB_Info GrB_Vector_wait(GrB_Vector v, GrB_WaitMode waitmode);
3059
3061
/* binary */
3060
3062
extern GrB_Info GB_BinaryOp_new (GrB_BinaryOp * binaryop , GxB_binary_function function , GrB_Type ztype , GrB_Type xtype , GrB_Type ytype , const char * binop_name );
3061
3063
3064
+ /* iterator */
3065
+ extern GrB_Info GB_Iterator_rc_bitmap_next (GxB_Iterator iterator );
3066
+ extern GrB_Info GB_Iterator_rc_seek (GxB_Iterator iterator , GrB_Index j , bool jth_vector );
3067
+ extern GrB_Info GB_Vector_Iterator_bitmap_seek (GxB_Iterator iterator , GrB_Index p );
3068
+
3069
+ /* matrix */
3070
+ extern GrB_Info GB_Iterator_attach (GxB_Iterator iterator , GrB_Matrix A , GxB_Format_Value format , GrB_Descriptor desc );
3071
+
3062
3072
/* selectop */
3063
3073
extern GrB_Info GB_SelectOp_new (GxB_SelectOp * selectop , GxB_select_function function , GrB_Type xtype , GrB_Type ttype , const char * name );
3064
3074
@@ -3101,8 +3111,51 @@ extern GrB_Info GxB_IndexUnaryOp_xtype_name(char *type_name, const GrB_IndexUnar
3101
3111
extern GrB_Info GxB_IndexUnaryOp_ytype_name (char * type_name , const GrB_IndexUnaryOp op );
3102
3112
extern GrB_Info GxB_IndexUnaryOp_ztype_name (char * type_name , const GrB_IndexUnaryOp op );
3103
3113
3114
+ /* iterator */
3115
+ extern GrB_Index GxB_Matrix_Iterator_getp (GxB_Iterator iterator );
3116
+ extern GrB_Index GxB_Matrix_Iterator_getpmax (GxB_Iterator iterator );
3117
+ extern GrB_Index GxB_Vector_Iterator_getIndex (GxB_Iterator iterator );
3118
+ extern GrB_Index GxB_Vector_Iterator_getp (GxB_Iterator iterator );
3119
+ extern GrB_Index GxB_Vector_Iterator_getpmax (GxB_Iterator iterator );
3120
+ extern GrB_Index GxB_colIterator_getColIndex (GxB_Iterator iterator );
3121
+ extern GrB_Index GxB_colIterator_getRowIndex (GxB_Iterator iterator );
3122
+ extern GrB_Index GxB_colIterator_kount (GxB_Iterator iterator );
3123
+ extern GrB_Index GxB_rowIterator_getColIndex (GxB_Iterator iterator );
3124
+ extern GrB_Index GxB_rowIterator_getRowIndex (GxB_Iterator iterator );
3125
+ extern GrB_Index GxB_rowIterator_kount (GxB_Iterator iterator );
3126
+ extern GrB_Info GxB_Iterator_free (GxB_Iterator * iterator );
3127
+ extern GrB_Info GxB_Iterator_new (GxB_Iterator * iterator );
3128
+ extern GrB_Info GxB_Matrix_Iterator_next (GxB_Iterator iterator );
3129
+ extern GrB_Info GxB_Matrix_Iterator_seek (GxB_Iterator iterator , GrB_Index p );
3130
+ extern GrB_Info GxB_Vector_Iterator_next (GxB_Iterator iterator );
3131
+ extern GrB_Info GxB_Vector_Iterator_seek (GxB_Iterator iterator , GrB_Index p );
3132
+ extern GrB_Info GxB_colIterator_kseek (GxB_Iterator iterator , GrB_Index k );
3133
+ extern GrB_Info GxB_colIterator_nextCol (GxB_Iterator iterator );
3134
+ extern GrB_Info GxB_colIterator_nextRow (GxB_Iterator iterator );
3135
+ extern GrB_Info GxB_colIterator_seekCol (GxB_Iterator iterator , GrB_Index col );
3136
+ extern GrB_Info GxB_rowIterator_kseek (GxB_Iterator iterator , GrB_Index k );
3137
+ extern GrB_Info GxB_rowIterator_nextCol (GxB_Iterator iterator );
3138
+ extern GrB_Info GxB_rowIterator_nextRow (GxB_Iterator iterator );
3139
+ extern GrB_Info GxB_rowIterator_seekRow (GxB_Iterator iterator , GrB_Index row );
3140
+ extern GxB_FC32_t GxB_Iterator_get_FC32 (GxB_Iterator iterator );
3141
+ extern GxB_FC64_t GxB_Iterator_get_FC64 (GxB_Iterator iterator );
3142
+ extern bool GxB_Iterator_get_BOOL (GxB_Iterator iterator );
3143
+ extern double GxB_Iterator_get_FP64 (GxB_Iterator iterator );
3144
+ extern float GxB_Iterator_get_FP32 (GxB_Iterator iterator );
3145
+ extern int8_t GxB_Iterator_get_INT8 (GxB_Iterator iterator );
3146
+ extern int16_t GxB_Iterator_get_INT16 (GxB_Iterator iterator );
3147
+ extern int32_t GxB_Iterator_get_INT32 (GxB_Iterator iterator );
3148
+ extern int64_t GxB_Iterator_get_INT64 (GxB_Iterator iterator );
3149
+ extern uint8_t GxB_Iterator_get_UINT8 (GxB_Iterator iterator );
3150
+ extern uint16_t GxB_Iterator_get_UINT16 (GxB_Iterator iterator );
3151
+ extern uint32_t GxB_Iterator_get_UINT32 (GxB_Iterator iterator );
3152
+ extern uint64_t GxB_Iterator_get_UINT64 (GxB_Iterator iterator );
3153
+ extern void GxB_Iterator_get_UDT (GxB_Iterator iterator , void * value );
3154
+ extern void GxB_Matrix_Iterator_getIndex (GxB_Iterator iterator , GrB_Index * row , GrB_Index * col );
3155
+
3104
3156
/* matrix */
3105
3157
extern GrB_Info GxB_Col_subassign (GrB_Matrix C , const GrB_Vector mask , const GrB_BinaryOp accum , const GrB_Vector u , const GrB_Index * I , GrB_Index ni , GrB_Index j , const GrB_Descriptor desc );
3158
+ extern GrB_Info GxB_Matrix_Iterator_attach (GxB_Iterator iterator , GrB_Matrix A , GrB_Descriptor desc );
3106
3159
extern GrB_Info GxB_Matrix_Option_get (GrB_Matrix A , GxB_Option_Field field , ...);
3107
3160
extern GrB_Info GxB_Matrix_Option_set (GrB_Matrix A , GxB_Option_Field field , ...);
3108
3161
extern GrB_Info GxB_Matrix_apply_BinaryOp1st (GrB_Matrix C , const GrB_Matrix Mask , const GrB_BinaryOp accum , const GrB_BinaryOp op , const GrB_Scalar x , const GrB_Matrix A , const GrB_Descriptor desc );
@@ -3195,6 +3248,8 @@ extern GrB_Info GxB_Matrix_unpack_HyperCSC(GrB_Matrix A, GrB_Index **Ap, GrB_Ind
3195
3248
extern GrB_Info GxB_Matrix_unpack_HyperCSR (GrB_Matrix A , GrB_Index * * Ap , GrB_Index * * Ah , GrB_Index * * Aj , void * * Ax , GrB_Index * Ap_size , GrB_Index * Ah_size , GrB_Index * Aj_size , GrB_Index * Ax_size , bool * iso , GrB_Index * nvec , bool * jumbled , const GrB_Descriptor desc );
3196
3249
extern GrB_Info GxB_Row_subassign (GrB_Matrix C , const GrB_Vector mask , const GrB_BinaryOp accum , const GrB_Vector u , GrB_Index i , const GrB_Index * J , GrB_Index nj , const GrB_Descriptor desc );
3197
3250
extern GrB_Info GxB_Vector_diag (GrB_Vector v , const GrB_Matrix A , int64_t k , const GrB_Descriptor desc );
3251
+ extern GrB_Info GxB_colIterator_attach (GxB_Iterator iterator , GrB_Matrix A , GrB_Descriptor desc );
3252
+ extern GrB_Info GxB_rowIterator_attach (GxB_Iterator iterator , GrB_Matrix A , GrB_Descriptor desc );
3198
3253
3199
3254
/* monoid */
3200
3255
extern GrB_Info GxB_Monoid_fprint (GrB_Monoid monoid , const char * name , GxB_Print_Level pr , FILE * f );
@@ -3289,6 +3344,7 @@ extern GrB_Info GxB_UnaryOp_ztype(GrB_Type *ztype, GrB_UnaryOp unaryop);
3289
3344
extern GrB_Info GxB_UnaryOp_ztype_name (char * type_name , const GrB_UnaryOp unaryop );
3290
3345
3291
3346
/* vector */
3347
+ extern GrB_Info GxB_Vector_Iterator_attach (GxB_Iterator iterator , GrB_Vector v , GrB_Descriptor desc );
3292
3348
extern GrB_Info GxB_Vector_Option_get (GrB_Vector A , GxB_Option_Field field , ...);
3293
3349
extern GrB_Info GxB_Vector_Option_set (GrB_Vector A , GxB_Option_Field field , ...);
3294
3350
extern GrB_Info GxB_Vector_apply_BinaryOp1st (GrB_Vector w , const GrB_Vector mask , const GrB_BinaryOp accum , const GrB_BinaryOp op , const GrB_Scalar x , const GrB_Vector u , const GrB_Descriptor desc );
0 commit comments