callbacks.pxd 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. from libc.stdint cimport uint32_t, uint64_t
  2. from lakesuperior.model.base cimport Buffer
  3. from lakesuperior.model.graph cimport graph
  4. from lakesuperior.model.graph.triple cimport BufferTriple
  5. cdef extern from 'spookyhash_api.h':
  6. uint64_t spookyhash_64(const void *input, size_t input_size, uint64_t seed)
  7. cdef:
  8. bint graph_eq_fn(graph.SimpleGraph g1, graph.SimpleGraph g2)
  9. int term_cmp_fn(const void* key1, const void* key2)
  10. int trp_cmp_fn(const void* key1, const void* key2)
  11. size_t term_hash_fn(const void* key, int l, uint32_t seed)
  12. size_t trp_hash_fn(const void* key, int l, uint32_t seed)
  13. bint lookup_none_cmp_fn(
  14. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  15. )
  16. bint lookup_s_cmp_fn(
  17. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  18. )
  19. bint lookup_p_cmp_fn(
  20. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  21. )
  22. bint lookup_o_cmp_fn(
  23. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  24. )
  25. bint lookup_sp_cmp_fn(
  26. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  27. )
  28. bint lookup_so_cmp_fn(
  29. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  30. )
  31. bint lookup_po_cmp_fn(
  32. const BufferTriple *trp, const Buffer *t1, const Buffer *t2
  33. )
  34. void add_trp_callback(
  35. graph.SimpleGraph gr, const BufferTriple* trp, void* ctx
  36. )
  37. void del_trp_callback(
  38. graph.SimpleGraph gr, const BufferTriple* trp, void* ctx
  39. )