findnonce.h 771 B

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