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

Function mexFunction

deps/GraphBLAS/Test/GB_mex_about.c:44–1198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42typedef int16_t user_int ;
43
44void mexFunction
45(
46 int nargout,
47 mxArray *pargout [ ],
48 int nargin,
49 const mxArray *pargin [ ]
50)
51{
52
53 //--------------------------------------------------------------------------
54 // start error log
55 //--------------------------------------------------------------------------
56
57 FILE *f = fopen ("errlog2.txt", "w") ;
58 printf ("in %s\n", __FILE__) ;
59 const char *err ;
60
61 //--------------------------------------------------------------------------
62 // test GrB_init with invalid mode
63 //--------------------------------------------------------------------------
64
65 GB_Global_GrB_init_called_set (false) ;
66 GrB_Info info = GrB_init (911) ;
67 printf ("expected error: [%d]\n", info) ;
68 mxAssert (info == GrB_INVALID_VALUE, "error must be 'invalid value'") ;
69
70 bool malloc_debug = GB_mx_get_global (true) ;
71
72 // GB_CONTEXT (USAGE) ;
73
74 printf ("in %s:\n", __FILE__) ;
75
76 printf ("sizeof (struct GB_Type_opaque) %d\n",
77 sizeof (struct GB_Type_opaque)) ;
78 printf ("sizeof (struct GB_UnaryOp_opaque) %d\n",
79 sizeof (struct GB_UnaryOp_opaque)) ;
80 printf ("sizeof (struct GB_BinaryOp_opaque) %d\n",
81 sizeof (struct GB_BinaryOp_opaque)) ;
82 printf ("sizeof (struct GB_SelectOp_opaque) %d\n",
83 sizeof (struct GB_SelectOp_opaque)) ;
84 printf ("sizeof (struct GB_Monoid_opaque) %d\n",
85 sizeof (struct GB_Monoid_opaque)) ;
86 printf ("sizeof (struct GB_Semiring_opaque) %d\n",
87 sizeof (struct GB_Semiring_opaque)) ;
88 printf ("sizeof (struct GB_Vector_opaque) %d\n",
89 sizeof (struct GB_Vector_opaque)) ;
90 printf ("sizeof (struct GB_Matrix_opaque) %d\n",
91 sizeof (struct GB_Matrix_opaque)) ;
92 printf ("sizeof (struct GB_Descriptor_opaque) %d\n",
93 sizeof (struct GB_Descriptor_opaque)) ;
94
95 size_t s ;
96 GxB_Type_size (&s, GrB_BOOL ) ; printf ("%d %d\n", s, sizeof (bool ));
97 GxB_Type_size (&s, GrB_INT8 ) ; printf ("%d %d\n", s, sizeof (int8_t ));
98 GxB_Type_size (&s, GrB_UINT8 ) ; printf ("%d %d\n", s, sizeof (uint8_t ));
99 GxB_Type_size (&s, GrB_INT16 ) ; printf ("%d %d\n", s, sizeof (int16_t ));
100 GxB_Type_size (&s, GrB_UINT16) ; printf ("%d %d\n", s, sizeof (uint16_t ));
101 GxB_Type_size (&s, GrB_INT32 ) ; printf ("%d %d\n", s, sizeof (int32_t ));

Callers

nothing calls this directly

Calls 15

GrB_initFunction · 0.85
GB_mx_get_globalFunction · 0.85
GxB_Type_sizeFunction · 0.85
GB_UnaryOp_checkFunction · 0.85
GxB_UnaryOp_ztypeFunction · 0.85
GB_Type_checkFunction · 0.85
GxB_UnaryOp_xtypeFunction · 0.85
GB_BinaryOp_checkFunction · 0.85
GxB_BinaryOp_ztypeFunction · 0.85
GxB_BinaryOp_xtypeFunction · 0.85
GxB_BinaryOp_ytypeFunction · 0.85

Tested by

no test coverage detected