Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove minor branch conditional in ar_mine_randomx #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -8,3 +8,5 @@ priv/prometheus_process_collector.so
_build
.rebar3
c_src/*.o
data_test_master/*
data_test_slave/*
6 changes: 1 addition & 5 deletions c_src/ar_mine_randomx.c
Expand Up @@ -137,11 +137,7 @@ static boolean init_dataset(randomx_dataset *datasetPtr, randomx_cache *cachePtr
workerPtr->datasetPtr = datasetPtr;

workerPtr->datasetInitStartItem = startItem;
if (i + 1 == numWorkers) {
workerPtr->datasetInitItemCount = itemsPerThread + itemsRemainder;
} else {
workerPtr->datasetInitItemCount = itemsPerThread;
}
workerPtr->datasetInitItemCount = itemsPerThread + itemsRemainder * (i + 1 == numWorkers);
startItem += workerPtr->datasetInitItemCount;
workerPtr->optsPtr = enif_thread_opts_create("init_fast_worker");
if (0 != enif_thread_create(
Expand Down