findnonce.h 754 B

123456789101112131415161718192021222324252627282930
  1. #ifndef BFG_FINDNONCE_H
  2. #define BFG_FINDNONCE_H
  3. #include <stdint.h>
  4. #include "driver-opencl.h"
  5. #include "miner.h"
  6. #include "config.h"
  7. #define MAXTHREADS (0xFFFFFFFEULL)
  8. #define MAXBUFFERS (0x10)
  9. #define BUFFERSIZE (sizeof(uint32_t) * MAXBUFFERS)
  10. #define FOUND (0x0F)
  11. #ifdef USE_SCRYPT
  12. #define SCRYPT_MAXBUFFERS (0x100)
  13. #define SCRYPT_BUFFERSIZE (sizeof(uint32_t) * SCRYPT_MAXBUFFERS)
  14. #define SCRYPT_FOUND (0xFF)
  15. #define OPENCL_MAX_BUFFERSIZE SCRYPT_BUFFERSIZE
  16. #else
  17. #define OPENCL_MAX_BUFFERSIZE BUFFERSIZE
  18. #endif
  19. #ifdef USE_SHA256D
  20. extern void precalc_hash(struct opencl_work_data *blk, uint32_t *state, uint32_t *data);
  21. #endif
  22. extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
  23. #endif /*__FINDNONCE_H__*/