1 //------------------------------------------------------------------------------
2 // GB_Asaxpy3B: hard-coded saxpy3 method for a semiring
3 //------------------------------------------------------------------------------
4
5 // SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
6 // SPDX-License-Identifier: Apache-2.0
7
8 //------------------------------------------------------------------------------
9
10 // If this file is in the Generated/ folder, do not edit it (auto-generated).
11
12 #include "GB_AxB_defs__min_rminus_uint16.h"
13 #ifndef GBCOMPACT
14
15 //------------------------------------------------------------------------------
16 // C=A*B, C<M>=A*B, C<!M>=A*B: saxpy method (Gustavson + Hash)
17 //------------------------------------------------------------------------------
18
GB(_Asaxpy3B__min_rminus_uint16)19 GrB_Info GB (_Asaxpy3B__min_rminus_uint16)
20 (
21 GrB_Matrix C, // C<any M>=A*B, C sparse or hypersparse
22 const GrB_Matrix M, const bool Mask_comp, const bool Mask_struct,
23 const bool M_packed_in_place,
24 const GrB_Matrix A, bool A_is_pattern,
25 const GrB_Matrix B, bool B_is_pattern,
26 GB_saxpy3task_struct *restrict SaxpyTasks,
27 const int ntasks, const int nfine, const int nthreads, const int do_sort,
28 GB_Context Context
29 )
30 {
31 #if GB_DISABLE
32 return (GrB_NO_VALUE) ;
33 #else
34 ASSERT (GB_IS_SPARSE (C) || GB_IS_HYPERSPARSE (C)) ;
35 if (M == NULL)
36 {
37 // C = A*B, no mask
38 return (GB (_Asaxpy3B_noM__min_rminus_uint16) (C,
39 A, A_is_pattern, B, B_is_pattern,
40 SaxpyTasks, ntasks, nfine, nthreads, do_sort, Context)) ;
41 }
42 else if (!Mask_comp)
43 {
44 // C<M> = A*B
45 return (GB (_Asaxpy3B_M__min_rminus_uint16) (C,
46 M, Mask_struct, M_packed_in_place,
47 A, A_is_pattern, B, B_is_pattern,
48 SaxpyTasks, ntasks, nfine, nthreads, do_sort, Context)) ;
49 }
50 else
51 {
52 // C<!M> = A*B
53 return (GB (_Asaxpy3B_notM__min_rminus_uint16) (C,
54 M, Mask_struct, M_packed_in_place,
55 A, A_is_pattern, B, B_is_pattern,
56 SaxpyTasks, ntasks, nfine, nthreads, do_sort, Context)) ;
57 }
58 #endif
59 }
60
61 #endif
62
63