findnonce.h 795 B

12345678910111213141516171819202122232425262728293031
  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_OPENCL
  20. #ifdef USE_SHA256D
  21. extern void precalc_hash(struct opencl_work_data *blk, uint32_t *state, uint32_t *data);
  22. #endif
  23. extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
  24. #endif /* USE_OPENCL */
  25. #endif /*__FINDNONCE_H__*/