Flags ordered by their impact on performance

Additional error handling
This commit is contained in:
tevador
2019-04-21 23:23:13 +02:00
parent d30eef75af
commit bc78b628ea
8 changed files with 54 additions and 36 deletions

View File

@@ -201,11 +201,11 @@ int main(int argc, char** argv) {
std::cout << "Memory initialized in " << sw.getElapsed() << " s" << std::endl;
std::cout << "Initializing " << threadCount << " virtual machine(s) ..." << std::endl;
for (int i = 0; i < threadCount; ++i) {
randomx_vm *vm = randomx_create_vm(flags);
if (miningMode)
randomx_vm_set_dataset(vm, dataset);
else
randomx_vm_set_cache(vm, cache);
randomx_vm *vm = randomx_create_vm(flags, cache, dataset);
if (vm == nullptr) {
std::cout << "ERROR: Unsupported virtual machine options" << std::endl;
return 1;
}
vms.push_back(vm);
}
std::cout << "Running benchmark (" << noncesCount << " nonces) ..." << std::endl;