1 //------------------------------------------------------------------------------ 2 // GB_dense.h: defintions for dense matrix operations 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 #ifndef GB_DENSE_H 11 #define GB_DENSE_H 12 13 #include "GB_ek_slice.h" 14 15 //------------------------------------------------------------------------------ 16 // GB_dense_ewise3_accum: C += A+B, all 3 matrices dense 17 //------------------------------------------------------------------------------ 18 19 void GB_dense_ewise3_accum // C += A+B, all matrices dense 20 ( 21 GrB_Matrix C, // input/output matrix 22 const GrB_Matrix A, 23 const GrB_Matrix B, 24 const GrB_BinaryOp op, 25 GB_Context Context 26 ) ; 27 28 //------------------------------------------------------------------------------ 29 // GB_dense_ewise3_noaccum: C = A+B where A and B are dense; C anything 30 //------------------------------------------------------------------------------ 31 32 GrB_Info GB_dense_ewise3_noaccum // C = A+B, where A and B are dense 33 ( 34 GrB_Matrix C, // input/output matrix 35 const bool C_is_dense, // true if C is dense 36 const GrB_Matrix A, 37 const GrB_Matrix B, 38 const GrB_BinaryOp op, 39 GB_Context Context 40 ) ; 41 42 //------------------------------------------------------------------------------ 43 // GB_dense_subassign_23: C(:,:) += A where C is dense and A is sparse or dense 44 //------------------------------------------------------------------------------ 45 46 GrB_Info GB_dense_subassign_23 // C += A; C is dense, A is sparse or dense 47 ( 48 GrB_Matrix C, // input/output matrix 49 const GrB_Matrix A, // input matrix 50 const GrB_BinaryOp accum, // operator to apply 51 GB_Context Context 52 ) ; 53 54 //------------------------------------------------------------------------------ 55 // GB_dense_subassign_22: C(:,:) += scalar where C is dense 56 //------------------------------------------------------------------------------ 57 58 GrB_Info GB_dense_subassign_22 // C += x where C is dense and x is a scalar 59 ( 60 GrB_Matrix C, // input/output matrix 61 const void *scalar, // input scalar 62 const GrB_Type atype, // type of the input scalar 63 const GrB_BinaryOp accum, // operator to apply 64 GB_Context Context 65 ) ; 66 67 //------------------------------------------------------------------------------ 68 // GB_dense_subassign_21: C(:,:) = scalar where C becomes dense 69 //------------------------------------------------------------------------------ 70 71 GrB_Info GB_dense_subassign_21 // C(:,:) = x, scalar to matrix assignment 72 ( 73 GrB_Matrix C, // input/output matrix 74 const void *scalar, // input scalar 75 const GrB_Type scalar_type, // type of the input scalar 76 GB_Context Context 77 ) ; 78 79 //------------------------------------------------------------------------------ 80 // GB_dense_subassign_05d: C(:,:)<M> = scalar ; C is dense 81 //------------------------------------------------------------------------------ 82 83 GrB_Info GB_dense_subassign_05d 84 ( 85 GrB_Matrix C, 86 // input: 87 const GrB_Matrix M, 88 const bool Mask_struct, 89 const void *scalar, 90 const GrB_Type atype, 91 GB_Context Context 92 ) ; 93 94 //------------------------------------------------------------------------------ 95 // GB_dense_subassign_06d: C(:,:)<A> = A ; C is dense 96 //------------------------------------------------------------------------------ 97 98 GrB_Info GB_dense_subassign_06d 99 ( 100 GrB_Matrix C, 101 // input: 102 const GrB_Matrix A, 103 const bool Mask_struct, 104 GB_Context Context 105 ) ; 106 107 //------------------------------------------------------------------------------ 108 // GB_subassign_24: C = A 109 //------------------------------------------------------------------------------ 110 111 GrB_Info GB_subassign_24 // C = A, copy A into an existing matrix C 112 ( 113 GrB_Matrix C, // output matrix to modify 114 const GrB_Matrix A, // input matrix to copy 115 GB_Context Context 116 ) ; 117 118 //------------------------------------------------------------------------------ 119 // GB_dense_subassign_25: C<M> = A ; C is empty, A is dense, M is structural 120 //------------------------------------------------------------------------------ 121 122 GrB_Info GB_dense_subassign_25 123 ( 124 GrB_Matrix C, 125 // input: 126 const GrB_Matrix M, 127 const GrB_Matrix A, 128 GB_Context Context 129 ) ; 130 131 #endif 132 133