1function test98
2%TEST98 test GrB_mxm, typecasting on the fly
3
4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
5% SPDX-License-Identifier: Apache-2.0
6
7% This test is for the case when the auto AxB method selects the hash
8
9rng ('default') ;
10
11semiring.multiply = 'times' ;
12semiring.add = 'plus' ;
13semiring.class = 'double' ;
14
15    n = 20 ;
16    A.matrix = sprandn (n, n, 1) ;
17    A.class = 'single' ;
18    B.matrix = sprandn (n, n, 0.01) ;
19    B.class = 'single' ;
20    C.matrix = sparse (n, n) ;
21    C.class = 'single' ;
22
23    C1 = GB_mex_mxm  (C, [ ], [ ], semiring, A, B, [ ]) ;
24    C2 = GB_spec_mxm (C, [ ], [ ], semiring, A, B, [ ]) ;
25    GB_spec_compare (C1, C2) ;
26
27fprintf ('\ntest98: all tests passed\n') ;
28
29