@@ -257,7 +257,7 @@ JIT_STR(void MF_ResidualBackward(MF_flowEdge *z, const double *y) {
257257JIT_STR (void MF_RxdMult64 (MF_resultTuple64 * z ,
258258 const MF_flowEdge * x , GrB_Index i , GrB_Index j ,
259259 const int64_t * y , GrB_Index iy , GrB_Index jy ,
260- const int64_t * theta ) {
260+ const bool * theta ) {
261261 double r = x -> capacity - x -> flow ;
262262 if (r > 0 ){
263263 z -> residual = r ;
@@ -275,7 +275,7 @@ JIT_STR(void MF_RxdMult64(MF_resultTuple64 *z,
275275JIT_STR (void MF_RxdMult32 (MF_resultTuple32 * z ,
276276 const MF_flowEdge * x , GrB_Index i , GrB_Index j ,
277277 const int32_t * y , GrB_Index iy , GrB_Index jy ,
278- const int32_t * theta ) {
278+ const bool * theta ) {
279279 double r = x -> capacity - x -> flow ;
280280 if (r > 0 ){
281281 z -> residual = r ;
@@ -432,7 +432,7 @@ JIT_STR(void MF_InitBack(MF_flowEdge * z,
432432JIT_STR (void MF_MxeMult64 (MF_resultTuple64 * z ,
433433 const MF_compareTuple64 * x , GrB_Index i , GrB_Index j ,
434434 const double * y , GrB_Index iy , GrB_Index jy ,
435- const int64_t * theta ){
435+ const bool * theta ){
436436 bool j_active = ((* y ) > 0 ) ;
437437 if ((x -> di < x -> dj - 1 ) /* case a */
438438 || (x -> di == x -> dj - 1 && !j_active ) /* case b */
@@ -455,7 +455,7 @@ JIT_STR(void MF_MxeMult64(MF_resultTuple64 * z,
455455JIT_STR (void MF_MxeMult32 (MF_resultTuple32 * z ,
456456 const MF_compareTuple32 * x , GrB_Index i , GrB_Index j ,
457457 const double * y , GrB_Index iy , GrB_Index jy ,
458- const int32_t * theta ){
458+ const bool * theta ){
459459 bool j_active = ((* y ) > 0 ) ;
460460 if ((x -> di < x -> dj - 1 ) /* case a */
461461 || (x -> di == x -> dj - 1 && !j_active ) /* case b */
@@ -514,12 +514,12 @@ JIT_STR(void MF_CreateCompareVec32(MF_compareTuple32 *comp,
514514//------------------------------------------------------------------------------
515515
516516JIT_STR (void MF_Prune64 (bool * z , const MF_resultTuple64 * x ,
517- GrB_Index ix , GrB_Index jx , const int64_t * theta ){
517+ GrB_Index ix , GrB_Index jx , const bool * theta ){
518518 * z = (x -> j != -1 ) ;
519519 }, PRUNE_STR64 )
520520
521521JIT_STR (void MF_Prune32 (bool * z , const MF_resultTuple32 * x ,
522- GrB_Index ix , GrB_Index jx , const int32_t * theta ){
522+ GrB_Index ix , GrB_Index jx , const bool * theta ){
523523 * z = (x -> j != -1 ) ;
524524 }, PRUNE_STR32 )
525525
@@ -749,6 +749,8 @@ int LAGr_MaxFlow
749749 GRB_TRY (GrB_Scalar_new (& zero , GrB_FP64 ));
750750 GRB_TRY (GrB_Scalar_setElement (zero , 0 ));
751751 GRB_TRY (GrB_Scalar_new (& empty , GrB_FP64 )) ;
752+ GRB_TRY (GrB_Scalar_new (& theta , GrB_BOOL )); // unused placeholder
753+ GRB_TRY (GrB_Scalar_setElement_BOOL (theta , false));
752754
753755 // create op for optional output flow_mtx
754756 if (flow_mtx != NULL )
@@ -798,10 +800,9 @@ int LAGr_MaxFlow
798800 "MF_ResidualFlow64" , RESIDUALFLOW_STR64 ));
799801
800802 // create ops for R*d semiring
801- GRB_TRY (GrB_Scalar_new (& theta , GrB_INT64 ));
802- GRB_TRY (GrB_Scalar_setElement_INT64 (theta , 0 ));
803+
803804 GRB_TRY (GxB_IndexBinaryOp_new (& RxdIndexMult ,
804- F_INDEX_BINARY (MF_RxdMult64 ), ResultTuple , FlowEdge , GrB_INT64 , GrB_INT64 ,
805+ F_INDEX_BINARY (MF_RxdMult64 ), ResultTuple , FlowEdge , GrB_INT64 , GrB_BOOL ,
805806 "MF_RxdMult64" , RXDMULT_STR64 ));
806807 GRB_TRY (GxB_BinaryOp_new_IndexOp (& RxdMult , RxdIndexMult , theta ));
807808 GRB_TRY (GxB_BinaryOp_new (& RxdAdd ,
@@ -817,7 +818,7 @@ int LAGr_MaxFlow
817818
818819 // create op to prune empty tuples
819820 GRB_TRY (GxB_IndexUnaryOp_new (& Prune ,
820- (GxB_index_unary_function ) MF_Prune64 , GrB_BOOL , ResultTuple , GrB_INT64 ,
821+ (GxB_index_unary_function ) MF_Prune64 , GrB_BOOL , ResultTuple , GrB_BOOL ,
821822 "MF_Prune64" , PRUNE_STR64 ));
822823
823824 // create ops for mapping
@@ -830,7 +831,7 @@ int LAGr_MaxFlow
830831
831832 // create ops for Map*e semiring
832833 GRB_TRY (GxB_IndexBinaryOp_new (& MxeIndexMult ,
833- F_INDEX_BINARY (MF_MxeMult64 ), ResultTuple , CompareTuple , GrB_FP64 , GrB_INT64 ,
834+ F_INDEX_BINARY (MF_MxeMult64 ), ResultTuple , CompareTuple , GrB_FP64 , GrB_BOOL ,
834835 "MF_MxeMult64" , MXEMULT_STR64 ));
835836 GRB_TRY (GxB_BinaryOp_new_IndexOp (& MxeMult , MxeIndexMult , theta ));
836837 GRB_TRY (GxB_BinaryOp_new (& MxeAdd ,
@@ -869,10 +870,8 @@ int LAGr_MaxFlow
869870 "MF_ResidualFlow32" , RESIDUALFLOW_STR32 ));
870871
871872 // create ops for R*d semiring
872- GRB_TRY (GrB_Scalar_new (& theta , GrB_INT32 ));
873- GRB_TRY (GrB_Scalar_setElement_INT32 (theta , 0 ));
874873 GRB_TRY (GxB_IndexBinaryOp_new (& RxdIndexMult ,
875- F_INDEX_BINARY (MF_RxdMult32 ), ResultTuple , FlowEdge , GrB_INT32 , GrB_INT32 ,
874+ F_INDEX_BINARY (MF_RxdMult32 ), ResultTuple , FlowEdge , GrB_INT32 , GrB_BOOL ,
876875 "MF_RxdMult32" , RXDMULT_STR32 ));
877876 GRB_TRY (GxB_BinaryOp_new_IndexOp (& RxdMult , RxdIndexMult , theta ));
878877 GRB_TRY (GxB_BinaryOp_new (& RxdAdd ,
@@ -888,7 +887,7 @@ int LAGr_MaxFlow
888887
889888 // create op to prune empty tuples
890889 GRB_TRY (GxB_IndexUnaryOp_new (& Prune ,
891- (GxB_index_unary_function ) MF_Prune32 , GrB_BOOL , ResultTuple , GrB_INT32 ,
890+ (GxB_index_unary_function ) MF_Prune32 , GrB_BOOL , ResultTuple , GrB_BOOL ,
892891 "MF_Prune32" , PRUNE_STR32 ));
893892
894893 // create ops for mapping
@@ -901,7 +900,7 @@ int LAGr_MaxFlow
901900
902901 // create ops for Map*e semiring
903902 GRB_TRY (GxB_IndexBinaryOp_new (& MxeIndexMult ,
904- F_INDEX_BINARY (MF_MxeMult32 ), ResultTuple , CompareTuple , GrB_FP64 , GrB_INT32 ,
903+ F_INDEX_BINARY (MF_MxeMult32 ), ResultTuple , CompareTuple , GrB_FP64 , GrB_BOOL ,
905904 "MF_MxeMult32" , MXEMULT_STR32 ));
906905 GRB_TRY (GxB_BinaryOp_new_IndexOp (& MxeMult , MxeIndexMult , theta ));
907906 GRB_TRY (GxB_BinaryOp_new (& MxeAdd ,
0 commit comments