mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-12 05:31:01 +00:00
Make bitforce nonce range support a command line option --bfl-range since enabling it decrease hashrate by 1%.
This commit is contained in:
parent
b8484956e6
commit
fd55fab96a
@ -144,6 +144,9 @@ char *opt_icarus_timing = NULL;
|
|||||||
char *opt_kernel_path;
|
char *opt_kernel_path;
|
||||||
char *cgminer_path;
|
char *cgminer_path;
|
||||||
|
|
||||||
|
#if defined(USE_BITFORCE)
|
||||||
|
bool opt_bfl_noncerange;
|
||||||
|
#endif
|
||||||
#define QUIET (opt_quiet || opt_realquiet)
|
#define QUIET (opt_quiet || opt_realquiet)
|
||||||
|
|
||||||
struct thr_info *thr_info;
|
struct thr_info *thr_info;
|
||||||
@ -776,6 +779,11 @@ static struct opt_table opt_config_table[] = {
|
|||||||
OPT_WITHOUT_ARG("--benchmark",
|
OPT_WITHOUT_ARG("--benchmark",
|
||||||
opt_set_bool, &opt_benchmark,
|
opt_set_bool, &opt_benchmark,
|
||||||
"Run cgminer in benchmark mode - produces no shares"),
|
"Run cgminer in benchmark mode - produces no shares"),
|
||||||
|
#if defined(USE_BITFORCE)
|
||||||
|
OPT_WITHOUT_ARG("--bfl-range",
|
||||||
|
opt_set_bool, &opt_bfl_noncerange,
|
||||||
|
"Use nonce range on bitforce devices if supported"),
|
||||||
|
#endif
|
||||||
#ifdef WANT_CPUMINE
|
#ifdef WANT_CPUMINE
|
||||||
OPT_WITH_ARG("--bench-algo|-b",
|
OPT_WITH_ARG("--bench-algo|-b",
|
||||||
set_int_0_to_9999, opt_show_intval, &opt_bench_algo,
|
set_int_0_to_9999, opt_show_intval, &opt_bench_algo,
|
||||||
|
@ -83,10 +83,13 @@ static bool bitforce_detect_one(const char *devpath)
|
|||||||
bitforce->device_path = strdup(devpath);
|
bitforce->device_path = strdup(devpath);
|
||||||
bitforce->deven = DEV_ENABLED;
|
bitforce->deven = DEV_ENABLED;
|
||||||
bitforce->threads = 1;
|
bitforce->threads = 1;
|
||||||
bitforce->sleep_ms = BITFORCE_SLEEP_MS;
|
|
||||||
/* Initially enable support for nonce range and disable it later if it
|
/* Initially enable support for nonce range and disable it later if it
|
||||||
* fails */
|
* fails */
|
||||||
bitforce->nonce_range = true;
|
if (opt_bfl_noncerange) {
|
||||||
|
bitforce->nonce_range = true;
|
||||||
|
bitforce->sleep_ms = BITFORCE_SLEEP_MS;
|
||||||
|
} else
|
||||||
|
bitforce->sleep_ms = BITFORCE_SLEEP_MS * 5;
|
||||||
|
|
||||||
if (likely((!memcmp(pdevbuf, ">>>ID: ", 7)) && (s = strstr(pdevbuf + 3, ">>>")))) {
|
if (likely((!memcmp(pdevbuf, ">>>ID: ", 7)) && (s = strstr(pdevbuf + 3, ">>>")))) {
|
||||||
s[0] = '\0';
|
s[0] = '\0';
|
||||||
|
3
miner.h
3
miner.h
@ -545,6 +545,9 @@ extern bool opt_api_network;
|
|||||||
extern bool opt_delaynet;
|
extern bool opt_delaynet;
|
||||||
extern bool opt_restart;
|
extern bool opt_restart;
|
||||||
extern char *opt_icarus_timing;
|
extern char *opt_icarus_timing;
|
||||||
|
#ifdef USE_BITFORCE
|
||||||
|
extern bool opt_bfl_noncerange;
|
||||||
|
#endif
|
||||||
|
|
||||||
extern pthread_rwlock_t netacc_lock;
|
extern pthread_rwlock_t netacc_lock;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user