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 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
//------------------------------------------------------------------------------
// GB_add_full_template: C=A+B; C is full
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2025, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//------------------------------------------------------------------------------
// C is full. The mask M is not present (otherwise, C would be sparse,
// hypersparse, or bitmap). All of these methods are asymptotically optimal.
// ------------------------------------------
// C = A + B
// ------------------------------------------
// full . sparse full
// full . bitmap full
// full . full sparse
// full . full bitmap
// full . full full
// If C is iso and full, this phase has nothing to do.
#ifndef GB_ISO_ADD
{
int64_t p ;
ASSERT (M == NULL) ;
ASSERT (A_is_full || B_is_full) ;
#ifdef GB_JIT_KERNEL
{
#if (GB_A_IS_FULL && GB_B_IS_FULL)
{
// C, A, and B are all full
#include "template/GB_add_full_30.c"
}
#elif (GB_A_IS_FULL)
{
// C and A are full; B is hypersparse, sparse, or bitmap
#if (GB_B_IS_BITMAP)
{
// C and A are full; B is bitmap
#include "template/GB_add_full_31.c"
}
#else
{
// C and A are full; B is sparse or hypersparse
#include "template/GB_add_full_32.c"
}
#endif
}
#else
{
// C and B are full; A is hypersparse, sparse, or bitmap
#if (GB_A_IS_BITMAP)
{
// C and B are full; A is bitmap
#include "template/GB_add_full_33.c"
}
#else
{
// C and B are full; A is hypersparse or sparse
#include "template/GB_add_full_34.c"
}
#endif
}
#endif
}
#else
{
if (A_is_full && B_is_full)
{
// C, A, and B are all full
#include "template/GB_add_full_30.c"
}
else if (A_is_full)
{
// C and A are full; B is hypersparse, sparse, or bitmap
if (B_is_bitmap)
{
// C and A are full; B is bitmap
#include "template/GB_add_full_31.c"
}
else
{
// C and A are full; B is sparse or hypersparse
#include "template/GB_add_full_32.c"
}
}
else
{
// C and B are full; A is hypersparse, sparse, or bitmap
if (A_is_bitmap)
{
// C and B are full; A is bitmap
#include "template/GB_add_full_33.c"
}
else
{
// C and B are full; A is hypersparse or sparse
#include "template/GB_add_full_34.c"
}
}
}
#endif
}
#endif
|