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

Function GxB_Vector_serialize

deps/GraphBLAS/Source/GxB_Vector_serialize.c:36–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34#include "GB_serialize.h"
35
36GrB_Info GxB_Vector_serialize // serialize a GrB_Vector to a blob
37(
38 // output:
39 void **blob_handle, // the blob, allocated on output
40 GrB_Index *blob_size_handle, // size of the blob on output
41 // input:
42 GrB_Vector u, // vector to serialize
43 const GrB_Descriptor desc // descriptor to select compression method
44 // and to control # of threads used
45)
46{
47
48 //--------------------------------------------------------------------------
49 // check inputs
50 //--------------------------------------------------------------------------
51
52 GB_WHERE1 ("GxB_Vector_serialize (&blob, &blob_size, u, desc)") ;
53 GB_BURBLE_START ("GxB_Vector_serialize") ;
54 GB_RETURN_IF_NULL (blob_handle) ;
55 GB_RETURN_IF_NULL (blob_size_handle) ;
56 GB_RETURN_IF_NULL_OR_FAULTY (u) ;
57 GB_GET_DESCRIPTOR (info, desc, xx1, xx2, xx3, xx4, xx5, xx6, xx7) ;
58
59 // get the compression method from the descriptor
60 int method = (desc == NULL) ? GxB_DEFAULT : desc->compression ;
61
62 //--------------------------------------------------------------------------
63 // serialize the vector
64 //--------------------------------------------------------------------------
65
66 (*blob_handle) = NULL ;
67 size_t blob_size = 0 ;
68 info = GB_serialize ((GB_void **) blob_handle, &blob_size, (GrB_Matrix) u,
69 method, Context) ;
70 (*blob_size_handle) = (GrB_Index) blob_size ;
71 GB_BURBLE_END ;
72 #pragma omp flush
73 return (info) ;
74}
75

Callers 1

mexFunctionFunction · 0.85

Calls 1

GB_serializeFunction · 0.85

Tested by

no test coverage detected