mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-09 22:38:01 +00:00
2b6e841673
This allows each local thread id to have one slot to put any positive results into, thus making overlapping results far less likely. Thus races will be much rarer, allowing more threads. It should also pick up blocks close to each other more reliably and hopefully decrease the number of rejects and opencl errors. Do the search over the buffer entirely in a separate thread to allow the GPU to stay as busy as possible. Detach threads from themselves to prevent unlucky even where dereferencing occurs by freeing the data that stores the thread info.
13 lines
450 B
C
13 lines
450 B
C
#ifndef __FINDNONCE_H__
|
|
#define __FINDNONCE_H__
|
|
#include "miner.h"
|
|
|
|
#define MAXTHREADS (0xFFFFFFFEULL)
|
|
/* Maximum worksize 512 * maximum vectors 4 plus one flag entry */
|
|
#define MAXBUFFERS (4 * 512)
|
|
#define BUFFERSIZE (sizeof(uint32_t) * (MAXBUFFERS + 1))
|
|
|
|
extern void precalc_hash(dev_blk_ctx *blk, uint32_t *state, uint32_t *data);
|
|
extern void postcalc_hash_async(struct thr_info *thr, struct work *work, uint32_t *res);
|
|
#endif /*__FINDNONCE_H__*/
|