@@ -312,7 +312,7 @@ void block_matrix_hyper_rotate_i(Matrix *matrix, enum Matrix_block format) {
312
312
GrB_Scalar_new (& scalar_true , GrB_BOOL );
313
313
GrB_Scalar_setElement_BOOL (scalar_true , true);
314
314
315
- if (matrix -> format == VEC_VERT ) {
315
+ if (matrix -> block_type == VEC_VERT ) {
316
316
GrB_Index * nrows = malloc (matrix -> nvals * sizeof (GrB_Index ));
317
317
GrB_Index * ncols = malloc (matrix -> nvals * sizeof (GrB_Index ));
318
318
@@ -330,7 +330,7 @@ void block_matrix_hyper_rotate_i(Matrix *matrix, enum Matrix_block format) {
330
330
return ;
331
331
}
332
332
333
- if (matrix -> format == VEC_HORIZ ) {
333
+ if (matrix -> block_type == VEC_HORIZ ) {
334
334
GrB_Index * nrows = malloc (matrix -> nvals * sizeof (GrB_Index ));
335
335
GrB_Index * ncols = malloc (matrix -> nvals * sizeof (GrB_Index ));
336
336
@@ -396,13 +396,13 @@ void block_matrix_reduce(Matrix *matrix, Matrix *input) {
396
396
GrB_Index * cols = malloc (input -> nvals * sizeof (GrB_Index ));
397
397
GrB_Matrix_extractTuples_BOOL (rows , cols , NULL , & input -> nvals , input -> base );
398
398
399
- if (input -> format == VEC_VERT ) {
399
+ if (input -> block_type == VEC_VERT ) {
400
400
for (size_t i = 0 ; i < input -> nvals ; i ++ ) {
401
401
rows [i ] = rows [i ] % input -> ncols ;
402
402
}
403
403
}
404
404
405
- if (input -> format == VEC_HORIZ ) {
405
+ if (input -> block_type == VEC_HORIZ ) {
406
406
for (size_t i = 0 ; i < input -> nvals ; i ++ ) {
407
407
cols [i ] = cols [i ] % input -> nrows ;
408
408
}
@@ -779,7 +779,7 @@ GrB_Info matrix_wise_block(Matrix *output, Matrix *first, Matrix *second, bool a
779
779
}
780
780
781
781
if (first -> block_type == CELL && second -> block_type == CELL ) {
782
- matrix_wise_lazy (output , first , second , accum );
782
+ return matrix_wise_lazy (output , first , second , accum );
783
783
}
784
784
785
785
// second is vector
@@ -794,18 +794,20 @@ GrB_Info matrix_wise_block(Matrix *output, Matrix *first, Matrix *second, bool a
794
794
795
795
// first is vector
796
796
if (second -> block_type == CELL ) {
797
+ // LG_SET_BURBLE(true);
797
798
Matrix temp_vector = matrix_create (first -> nrows , first -> ncols );
798
799
GrB_Index block_count = first -> nrows > first -> ncols ? first -> nrows : first -> ncols ;
799
800
block_matrix_repeat_into_vector (& temp_vector , second , block_count );
800
801
802
+ block_matrix_hyper_rotate_i (& temp_vector , first -> block_type );
801
803
GrB_Info info = matrix_wise_lazy (output , first , & temp_vector , accum );
802
804
matrix_free (& temp_vector );
803
805
return info ;
804
806
}
805
807
806
808
// both are vector
807
809
block_matrix_hyper_rotate_i (second , first -> block_type );
808
- return matrix_wise_block (output , first , second , accum );
810
+ return matrix_wise_lazy (output , first , second , accum );
809
811
}
810
812
811
813
GrB_Info matrix_rsub (Matrix * output , Matrix * mask ) {
0 commit comments