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

Function GB_code_compatible

deps/GraphBLAS/Source/GB_code_compatible.h:18–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16// available, GB_Type_compatible should be called instead.
17
18static inline bool GB_code_compatible // true if two types can be typecast
19(
20 const GB_Type_code acode, // type code of a
21 const GB_Type_code bcode // type code of b
22)
23{
24
25 bool a_user = (acode == GB_UDT_code) ;
26 bool b_user = (bcode == GB_UDT_code) ;
27
28 if (a_user || b_user)
29 {
30 // both a and b must be user-defined. They should be the same
31 // user-defined type, but the caller does not have the actual type,
32 // just the code.
33 return (a_user && b_user) ;
34 }
35 else
36 {
37 // any built-in domain is compatible with any other built-in domain
38 return (true) ;
39 }
40}
41
42#endif
43

Callers 8

GB_setElementFunction · 0.85
GB_assign_prepFunction · 0.85
GB_cast_arrayFunction · 0.85
GB_BinaryOp_compatibleFunction · 0.85
GB_extractTuplesFunction · 0.85
GB_EXTRACT_ELEMENTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected