File: GB_add_bitmap_noM.c

package info (click to toggle)
suitesparse 1%3A7.10.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 254,920 kB
  • sloc: ansic: 1,134,743; cpp: 46,133; makefile: 4,875; fortran: 2,087; java: 1,826; sh: 996; ruby: 725; python: 495; asm: 371; sed: 166; awk: 44
file content (65 lines) | stat: -rw-r--r-- 1,895 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//------------------------------------------------------------------------------
// GB_add_bitmap_noM: C=A+B, C bitmap, A or B bitmap
//------------------------------------------------------------------------------

// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2025, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

//------------------------------------------------------------------------------

// C is bitmap.
// A or B is bitmap (or both).  Neither A nor B are full.

{

    //      ------------------------------------------
    //      C       =           A       +       B
    //      ------------------------------------------
    //      bitmap  .           sparse          bitmap
    //      bitmap  .           bitmap          sparse
    //      bitmap  .           bitmap          bitmap

    ASSERT (A_is_bitmap || B_is_bitmap) ;
    ASSERT (!A_is_full) ;
    ASSERT (!B_is_full) ;

    #ifdef GB_JIT_KERNEL
    {
        #if (GB_A_IS_BITMAP && GB_B_IS_BITMAP)
        {
            // A and B are both bitmap
            #include "template/GB_add_bitmap_noM_21.c"
        }
        #elif (GB_A_IS_BITMAP)
        {
            // A is bitmap, B is sparse/hyper
            #include "template/GB_add_bitmap_noM_22.c"
        }
        #else
        {
            // A is sparse/hyper, B is bitmap
            #include "template/GB_add_bitmap_noM_23.c"
        }
        #endif
    }
    #else
    {
        if (A_is_bitmap && B_is_bitmap)
        { 
            // A and B are both bitmap
            #include "template/GB_add_bitmap_noM_21.c"
        }
        else if (A_is_bitmap)
        { 
            // A is bitmap, B is sparse/hyper
            #include "template/GB_add_bitmap_noM_22.c"
        }
        else
        { 
            // A is sparse/hyper, B is bitmap
            #include "template/GB_add_bitmap_noM_23.c"
        }
    }
    #endif
}