libssplus.h 803 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright 2016 Mikeqin <Fengling.Qin@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the Free
  6. * Software Foundation; either version 3 of the License, or (at your option)
  7. * any later version. See COPYING for more details.
  8. */
  9. #ifndef LIBSSPLUS_H
  10. #define LIBSSPLUS_H
  11. #define HT_SIZE (1 << 22)
  12. #define HT_PRB_LMT 1
  13. #define HT_PRB_C1 0
  14. #define HT_PRB_C2 1
  15. typedef uint32_t ssp_pair[2];
  16. int ssp_hasher_init(void);
  17. void ssp_hasher_update_stratum(struct pool *pool, bool clean);
  18. void ssp_hasher_test(void);
  19. void ssp_sorter_init(uint32_t max_size, uint32_t limit, uint32_t c1, uint32_t c2);
  20. void ssp_sorter_flush(void);
  21. int ssp_sorter_get_pair(ssp_pair pair);
  22. #endif /* LIBSSPLUS_H */