work2d.h 826 B

123456789101112131415161718192021
  1. #ifndef BFG_WORK2D_H
  2. #define BFG_WORK2D_H
  3. #include <stdbool.h>
  4. #include <stdint.h>
  5. #define WORK2D_MAX_DIVISIONS 255
  6. extern int work2d_xnonce1sz;
  7. extern int work2d_xnonce2sz;
  8. extern void work2d_init();
  9. extern bool reserve_work2d_(uint32_t *xnonce1_p);
  10. extern void release_work2d_(uint32_t xnonce1);
  11. extern int work2d_pad_xnonce_size(const struct stratum_work *);
  12. extern void *work2d_pad_xnonce(void *buf, const struct stratum_work *, bool hex);
  13. extern void work2d_gen_dummy_work(struct work *, struct stratum_work *, const struct timeval *tvp_prepared, const void *xnonce2, uint32_t xnonce1);
  14. extern bool work2d_submit_nonce(struct thr_info *, struct stratum_work *, const struct timeval *tvp_prepared, const void *xnonce2, uint32_t xnonce1, uint32_t nonce, uint32_t ntime, bool *out_is_stale, float nonce_diff);
  15. #endif