MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / GrB_Matrix_assign

Function GrB_Matrix_assign

deps/GraphBLAS/Source/GrB_Matrix_assign.c:14–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include "GB_get_mask.h"
13
14GrB_Info GrB_Matrix_assign // C<M>(Rows,Cols) += A or A'
15(
16 GrB_Matrix C, // input/output matrix for results
17 const GrB_Matrix M_in, // mask for C, unused if NULL
18 const GrB_BinaryOp accum, // accum for Z=accum(C(Rows,Cols),T)
19 const GrB_Matrix A, // first input: matrix A
20 const GrB_Index *Rows, // row indices
21 GrB_Index nRows, // number of row indices
22 const GrB_Index *Cols, // column indices
23 GrB_Index nCols, // number of column indices
24 const GrB_Descriptor desc // descriptor for C, M, and A
25)
26{
27
28 //--------------------------------------------------------------------------
29 // check inputs
30 //--------------------------------------------------------------------------
31
32 GB_WHERE (C, "GrB_Matrix_assign"
33 " (C, M, accum, A, Rows, nRows, Cols, nCols, desc)") ;
34 GB_BURBLE_START ("GrB_assign") ;
35
36 GB_RETURN_IF_NULL_OR_FAULTY (C) ;
37 GB_RETURN_IF_FAULTY (M_in) ;
38 GB_RETURN_IF_NULL_OR_FAULTY (A) ;
39
40 // get the descriptor
41 GB_GET_DESCRIPTOR (info, desc, C_replace, Mask_comp, Mask_struct,
42 A_transpose, xx1, xx2, xx7) ;
43
44 // get the mask
45 GrB_Matrix M = GB_get_mask (M_in, &Mask_comp, &Mask_struct) ;
46
47 //--------------------------------------------------------------------------
48 // C<M>(Rows,Cols) = accum (C(Rows,Cols), A) and variations
49 //--------------------------------------------------------------------------
50
51 info = GB_assign (
52 C, C_replace, // C matrix and its descriptor
53 M, Mask_comp, Mask_struct, // mask matrix and its descriptor
54 false, // do not transpose the mask
55 accum, // for accum (C(Rows,Cols),A)
56 A, A_transpose, // A and its descriptor (T=A or A')
57 Rows, nRows, // row indices
58 Cols, nCols, // column indices
59 false, NULL, GB_ignore_code, // no scalar expansion
60 GB_ASSIGN,
61 Context) ;
62
63 GB_BURBLE_END ;
64 return (info) ;
65}
66

Callers 8

Graph_DeleteNodesFunction · 0.85
RG_Matrix_sync_additionsFunction · 0.85
mexFunctionFunction · 0.85
gb_typecastFunction · 0.85
gb_assignFunction · 0.85
read_matrixFunction · 0.85
GrB_InfoFunction · 0.85
mexFunctionFunction · 0.85

Calls 2

GB_get_maskFunction · 0.85
GB_assignFunction · 0.85

Tested by

no test coverage detected