Skip to content
This repository has been archived by the owner on Apr 24, 2022. It is now read-only.

Commit

Permalink
Constrain --cuda-parallel-hash parameter to powers of 2
Browse files Browse the repository at this point in the history
Fix broken simulation and benchmark option processing
  • Loading branch information
jean-m-cyr committed May 27, 2018
1 parent 66a7e79 commit 06419f6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ethminer/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,10 @@ class MinerCLI
->group(CUDAGroup)
->set_type_name("<n>");

app.add_option("--cuda-parallel-hash", m_cudaParallelHash,
app.add_set("--cuda-parallel-hash", m_cudaParallelHash, {1, 2, 4, 8},
"Set the number of hashes per kernel (default: 4)")
->group(CUDAGroup)
->check(CLI::Range(1, 8))
->set_type_name("<n>");
->set_type_name("<1|2|4|8>");

string sched = "sync";
app.add_set("--cuda-schedule", sched, {"auto", "spin", "yield", "sync"},
Expand Down Expand Up @@ -489,7 +488,7 @@ class MinerCLI
m_minerType = MinerType::CUDA;
else if (mixed_miner)
m_minerType = MinerType::Mixed;
else if (bench_opt->count())
if (bench_opt->count())
m_mode = OperationMode::Benchmark;
else if (sim_opt->count())
m_mode = OperationMode::Simulation;
Expand Down

0 comments on commit 06419f6

Please sign in to comment.