1212// hypersparse, full if both A and B are full, or sparse otherwise. C is never
1313// constructed as bitmap.
1414
15- #include <stdio.h>
16-
1715#define GB_FREE_WORKSPACE \
1816{ \
1917 GB_Matrix_free (&Awork) ; \
3836#include "jitifyer/GB_stringify.h"
3937
4038//------------------------------------------------------------------------------
41- // GB_lookup_xoffset: find the offset of (row,col) in a matrix
39+ // GB_lookup_xoffset: find the offset of (row,col) in a Ax if present
4240//------------------------------------------------------------------------------
4341
4442static bool GB_lookup_xoffset
@@ -97,7 +95,7 @@ static bool GB_lookup_xoffset
9795}
9896
9997//------------------------------------------------------------------------------
100- // GB_kroner_generic: generic fallback kernel for both masked and default paths
98+ // GB_kroner_generic: generic kernel for masked and default paths
10199//------------------------------------------------------------------------------
102100
103101static GrB_Info GB_kroner_generic
@@ -121,7 +119,6 @@ static GrB_Info GB_kroner_generic
121119 GrB_Type ctype = op -> ztype ;
122120 const size_t csize = ctype -> size ;
123121
124- // declare everything the template needs
125122 GB_Ap_DECLARE (Ap , const ) ; GB_Ap_PTR (Ap , A ) ;
126123 GB_Ah_DECLARE (Ah , const ) ; GB_Ah_PTR (Ah , A ) ;
127124 const int64_t avlen = A -> vlen ;
@@ -199,7 +196,6 @@ static GrB_Info GB_kroner_generic
199196 #define GB_GENERIC
200197 #include "ewise/include/GB_ewise_shared_definitions.h"
201198 #include "kronecker/template/GB_kroner_template.c"
202-
203199
204200 return GrB_SUCCESS ;
205201}
@@ -261,7 +257,7 @@ GrB_Info GB_kroner
261257 GrB_Matrix B = B_in ;
262258
263259 //--------------------------------------------------------------------------
264- // masked case: apply mask to avoid computing entries outside the mask
260+ // apply mask immediately if possible
265261 //--------------------------------------------------------------------------
266262
267263 if (Mask != NULL && !Mask_comp )
@@ -305,7 +301,6 @@ GrB_Info GB_kroner
305301 int nthreads_max = GB_Context_nthreads_max ( ) ;
306302 double chunk = GB_Context_chunk ( ) ;
307303 int nthreads = GB_nthreads (work , chunk , nthreads_max ) ;
308- printf ("threads initially: %d\n" , nthreads ) ;
309304
310305 int64_t vlen = Mask -> vlen ;
311306
@@ -466,23 +461,22 @@ GrB_Info GB_kroner
466461 C -> p = Mask -> p_is_32 ? (void * ) Cp32 : (void * ) Cp64 ;
467462 C -> i = Mask -> i_is_32 ? (void * ) Ci32 : (void * ) Ci64 ;
468463 C -> x = Cx ;
469- C -> p_size = (Mask -> p_is_32 ? sizeof (uint32_t )
470- : sizeof (uint64_t ))
471- * (Mask -> vdim + 1 ) ;
472- C -> i_size = (Mask -> i_is_32 ? sizeof (uint32_t )
473- : sizeof (uint64_t )) * centries ;
474- C -> x_size = C -> iso ? op -> ztype -> size
475- : op -> ztype -> size * centries ;
476- C -> magic = GB_MAGIC ;
477- C -> nvals = centries ;
464+ C -> p_size = (Mask -> p_is_32 ? sizeof (uint32_t )
465+ : sizeof (uint64_t ))
466+ * (Mask -> vdim + 1 ) ;
467+ C -> i_size = (Mask -> i_is_32 ? sizeof (uint32_t )
468+ : sizeof (uint64_t )) * centries ;
469+ C -> x_size = C -> iso ? op -> ztype -> size
470+ : op -> ztype -> size * centries ;
471+ C -> magic = GB_MAGIC ;
472+ C -> nvals = centries ;
478473 C -> nvec_nonempty = (int64_t ) nvecs ;
479474
480475 //----------------------------------------------------------------------
481- // evaluate: JIT then generic fallback
476+ // evaluate
482477 //----------------------------------------------------------------------
483478
484479 info = GB_kroner_jit (C , op , false, A , A_transpose , B , B_transpose , Mask , Mask_struct , Mask_comp , nthreads ) ;
485- printf ("info: %d\n" , info ) ;
486480
487481 if (info != GrB_SUCCESS )
488482 {
@@ -649,11 +643,10 @@ GrB_Info GB_kroner
649643 }
650644
651645 //--------------------------------------------------------------------------
652- // evaluate: JIT then generic fallback
646+ // evaluate: JIT or generic
653647 //--------------------------------------------------------------------------
654648
655649 info = GB_kroner_jit (C , op , flipij , A , A_transpose , B , B_transpose , Mask , Mask_struct , Mask_comp , nthreads ) ;
656- printf ("default jit info: %d\n" , info ) ;
657650
658651 if (info != GrB_SUCCESS )
659652 {
0 commit comments