Removed duplicate strings.

This commit is contained in:
XMRig 2021-08-11 22:07:43 +07:00
parent aee0762424
commit e9ae4deb91
No known key found for this signature in database
GPG key ID: 446A53638BE94409
6 changed files with 60 additions and 63 deletions

View file

@ -1,12 +1,6 @@
/* XMRig
* Copyright 2010 Jeff Garzik <jgarzik@pobox.com>
* Copyright 2012-2014 pooler <pooler@litecoinpool.org>
* Copyright 2014 Lucas Jones <https://github.com/lucasjones>
* Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet>
* Copyright 2016 Jay D Dee <jayddee246@gmail.com>
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018-2020 SChernykh <https://github.com/SChernykh>
* Copyright 2016-2020 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright (c) 2018-2021 SChernykh <https://github.com/SChernykh>
* Copyright (c) 2016-2021 XMRig <https://github.com/xmrig>, <support@xmrig.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -56,8 +50,8 @@ size_t inline generate<Algorithm::CN>(Threads<CudaThreads> &threads, const std::
{
size_t count = 0;
count += generate("cn", threads, Algorithm::CN_1, devices);
count += generate("cn/2", threads, Algorithm::CN_2, devices);
count += generate(Algorithm::kCN, threads, Algorithm::CN_1, devices);
count += generate(Algorithm::kCN_2, threads, Algorithm::CN_2, devices);
if (!threads.isExist(Algorithm::CN_0)) {
threads.disable(Algorithm::CN_0);
@ -72,7 +66,7 @@ size_t inline generate<Algorithm::CN>(Threads<CudaThreads> &threads, const std::
template<>
size_t inline generate<Algorithm::CN_LITE>(Threads<CudaThreads> &threads, const std::vector<CudaDevice> &devices)
{
size_t count = generate("cn-lite", threads, Algorithm::CN_LITE_1, devices);
size_t count = generate(Algorithm::kCN_LITE, threads, Algorithm::CN_LITE_1, devices);
if (!threads.isExist(Algorithm::CN_LITE_0)) {
threads.disable(Algorithm::CN_LITE_0);
@ -88,7 +82,7 @@ size_t inline generate<Algorithm::CN_LITE>(Threads<CudaThreads> &threads, const
template<>
size_t inline generate<Algorithm::CN_HEAVY>(Threads<CudaThreads> &threads, const std::vector<CudaDevice> &devices)
{
return generate("cn-heavy", threads, Algorithm::CN_HEAVY_0, devices);
return generate(Algorithm::kCN_HEAVY, threads, Algorithm::CN_HEAVY_0, devices);
}
#endif
@ -97,7 +91,7 @@ size_t inline generate<Algorithm::CN_HEAVY>(Threads<CudaThreads> &threads, const
template<>
size_t inline generate<Algorithm::CN_PICO>(Threads<CudaThreads> &threads, const std::vector<CudaDevice> &devices)
{
return generate("cn-pico", threads, Algorithm::CN_PICO_0, devices);
return generate(Algorithm::kCN_PICO, threads, Algorithm::CN_PICO_0, devices);
}
#endif
@ -106,7 +100,7 @@ size_t inline generate<Algorithm::CN_PICO>(Threads<CudaThreads> &threads, const
template<>
size_t inline generate<Algorithm::CN_FEMTO>(Threads<CudaThreads>& threads, const std::vector<CudaDevice>& devices)
{
return generate("cn/upx2", threads, Algorithm::CN_UPX2, devices);
return generate(Algorithm::kCN_UPX2, threads, Algorithm::CN_UPX2, devices);
}
#endif
@ -123,18 +117,18 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
auto kva = CudaThreads(devices, Algorithm::RX_KEVA);
if (!threads.isExist(Algorithm::RX_WOW) && wow != rx) {
count += threads.move("rx/wow", std::move(wow));
count += threads.move(Algorithm::kRX_WOW, std::move(wow));
}
if (!threads.isExist(Algorithm::RX_ARQ) && arq != rx) {
count += threads.move("rx/arq", std::move(arq));
count += threads.move(Algorithm::kRX_ARQ, std::move(arq));
}
if (!threads.isExist(Algorithm::RX_KEVA) && kva != rx) {
count += threads.move("rx/keva", std::move(kva));
count += threads.move(Algorithm::kRX_KEVA, std::move(kva));
}
count += threads.move("rx", std::move(rx));
count += threads.move(Algorithm::kRX, std::move(rx));
return count;
}
@ -145,7 +139,7 @@ size_t inline generate<Algorithm::RANDOM_X>(Threads<CudaThreads> &threads, const
template<>
size_t inline generate<Algorithm::ASTROBWT>(Threads<CudaThreads> &threads, const std::vector<CudaDevice> &devices)
{
return generate("astrobwt", threads, Algorithm::ASTROBWT_DERO, devices);
return generate(Algorithm::kASTROBWT, threads, Algorithm::ASTROBWT_DERO, devices);
}
#endif
@ -154,7 +148,7 @@ size_t inline generate<Algorithm::ASTROBWT>(Threads<CudaThreads> &threads, const
template<>
size_t inline generate<Algorithm::KAWPOW>(Threads<CudaThreads> &threads, const std::vector<CudaDevice> &devices)
{
return generate("kawpow", threads, Algorithm::KAWPOW_RVN, devices);
return generate(Algorithm::kKAWPOW, threads, Algorithm::KAWPOW_RVN, devices);
}
#endif