diff --git a/nheqminer/libstratum/StratumClient.cpp b/nheqminer/libstratum/StratumClient.cpp index f9b96bc9c..c8c00d338 100644 --- a/nheqminer/libstratum/StratumClient.cpp +++ b/nheqminer/libstratum/StratumClient.cpp @@ -426,9 +426,12 @@ template class StratumClient; template class StratumClient; template class StratumClient; template class StratumClient; +template class StratumClient; +template class StratumClient; // Silentarmy template class StratumClient; -template class StratumClient; template class StratumClient; template class StratumClient; -template class StratumClient; \ No newline at end of file +template class StratumClient; +template class StratumClient; +template class StratumClient; \ No newline at end of file diff --git a/nheqminer/libstratum/StratumClient.h b/nheqminer/libstratum/StratumClient.h index 1cb8f0689..7002f0995 100644 --- a/nheqminer/libstratum/StratumClient.h +++ b/nheqminer/libstratum/StratumClient.h @@ -167,9 +167,12 @@ typedef StratumClient ZcashStra typedef StratumClient ZcashStratumClientSSE2CUDA80_XMP; typedef StratumClient ZcashStratumClientAVXCUDA75_XMP; typedef StratumClient ZcashStratumClientSSE2CUDA75_XMP; +typedef StratumClient ZcashStratumClientAVXCUDASA80_XMP; +typedef StratumClient ZcashStratumClientSSE2CUDASA80_XMP; // Silentarmy typedef StratumClient ZcashStratumClientAVXCUDA80_SA; typedef StratumClient ZcashStratumClientSSE2CUDA80_SA; typedef StratumClient ZcashStratumClientAVXCUDA75_SA; +typedef StratumClient ZcashStratumClientSSE2CUDA75_SA; typedef StratumClient ZcashStratumClientAVXCUDASA80_SA; -typedef StratumClient ZcashStratumClientSSE2CUDA75_SA; \ No newline at end of file +typedef StratumClient ZcashStratumClientSSE2CUDASA80_SA; \ No newline at end of file diff --git a/nheqminer/libstratum/ZcashStratum.cpp b/nheqminer/libstratum/ZcashStratum.cpp index 23c423b1f..d7cab675d 100644 --- a/nheqminer/libstratum/ZcashStratum.cpp +++ b/nheqminer/libstratum/ZcashStratum.cpp @@ -612,12 +612,16 @@ template class ZcashMiner; template class ZcashMiner; template class ZcashMiner; template class ZcashMiner; +template class ZcashMiner; +template class ZcashMiner; + // Silentarmy template class ZcashMiner; template class ZcashMiner; template class ZcashMiner; template class ZcashMiner; template class ZcashMiner; +template class ZcashMiner; std::mutex benchmark_work; std::vector benchmark_nonces; @@ -858,6 +862,15 @@ void ZMinerSSE2CUDA75_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_coun int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { ZMinerSSE2CUDA75_XMP::doBenchmark(hashes, cpu_threads, cuda_count, cuda_en, cuda_b, cuda_t, opencl_count, opencl_platf, opencl_en, opencl_t); } +void ZMinerAVXCUDASA80_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { + ZMinerAVXCUDASA80_XMP::doBenchmark(hashes, cpu_threads, cuda_count, cuda_en, cuda_b, cuda_t, opencl_count, opencl_platf, opencl_en, opencl_t); +} +void ZMinerSSE2CUDASA80_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { + ZMinerSSE2CUDASA80_XMP::doBenchmark(hashes, cpu_threads, cuda_count, cuda_en, cuda_b, cuda_t, opencl_count, opencl_platf, opencl_en, opencl_t); +} + // ocl_silentarmy void ZMinerAVXCUDA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { @@ -879,4 +892,8 @@ void ZMinerAVXCUDASA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_coun int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { ZMinerAVXCUDASA80_SA::doBenchmark(hashes, cpu_threads, cuda_count, cuda_en, cuda_b, cuda_t, opencl_count, opencl_platf, opencl_en, opencl_t); } +void ZMinerSSE2CUDASA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t) { + ZMinerSSE2CUDASA80_SA::doBenchmark(hashes, cpu_threads, cuda_count, cuda_en, cuda_b, cuda_t, opencl_count, opencl_platf, opencl_en, opencl_t); +} diff --git a/nheqminer/libstratum/ZcashStratum.h b/nheqminer/libstratum/ZcashStratum.h index 5c8b24d72..b8d686d98 100644 --- a/nheqminer/libstratum/ZcashStratum.h +++ b/nheqminer/libstratum/ZcashStratum.h @@ -160,12 +160,16 @@ typedef ZcashMiner ZMinerAVXCUDA80_XMP; typedef ZcashMiner ZMinerSSE2CUDA80_XMP; typedef ZcashMiner ZMinerAVXCUDA75_XMP; typedef ZcashMiner ZMinerSSE2CUDA75_XMP; +typedef ZcashMiner ZMinerSSE2CUDASA80_XMP; +typedef ZcashMiner ZMinerAVXCUDASA80_XMP; + // ocl_silentarmy typedef ZcashMiner ZMinerAVXCUDA80_SA; -typedef ZcashMiner ZMinerAVXCUDASA80_SA; typedef ZcashMiner ZMinerSSE2CUDA80_SA; typedef ZcashMiner ZMinerAVXCUDA75_SA; typedef ZcashMiner ZMinerSSE2CUDA75_SA; +typedef ZcashMiner ZMinerSSE2CUDASA80_SA; +typedef ZcashMiner ZMinerAVXCUDASA80_SA; // ocl_xmp // gcc static undefined reference workaround @@ -177,6 +181,10 @@ void ZMinerAVXCUDA75_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); void ZMinerSSE2CUDA75_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); +void ZMinerAVXCUDASA80_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); +void ZMinerSSE2CUDASA80_XMP_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); // ocl_silentarmy void ZMinerAVXCUDA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); @@ -187,4 +195,6 @@ void ZMinerAVXCUDA75_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, void ZMinerSSE2CUDA75_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); void ZMinerAVXCUDASA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, + int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); +void ZMinerSSE2CUDASA80_SA_doBenchmark(int hashes, int cpu_threads, int cuda_count, int* cuda_en, int* cuda_b, int* cuda_t, int opencl_count, int opencl_platf, int* opencl_en, int* opencl_t); \ No newline at end of file diff --git a/nheqminer/main.cpp b/nheqminer/main.cpp index 008247ffa..16a92dde4 100644 --- a/nheqminer/main.cpp +++ b/nheqminer/main.cpp @@ -58,12 +58,17 @@ static ZcashStratumClientAVXCUDA80_XMP* scSigAVXC80_XMP = nullptr; static ZcashStratumClientSSE2CUDA80_XMP* scSigSSE2C80_XMP = nullptr; static ZcashStratumClientAVXCUDA75_XMP* scSigAVXC75_XMP = nullptr; static ZcashStratumClientSSE2CUDA75_XMP* scSigSSE2C75_XMP = nullptr; +static ZcashStratumClientAVXCUDASA80_XMP* scSigAVXCSA80_XMP = nullptr; +static ZcashStratumClientSSE2CUDASA80_XMP* scSigSSE2CSA80_XMP = nullptr; + // _SA static ZcashStratumClientAVXCUDA80_SA* scSigAVXC80_SA = nullptr; static ZcashStratumClientSSE2CUDA80_SA* scSigSSE2C80_SA = nullptr; static ZcashStratumClientAVXCUDA75_SA* scSigAVXC75_SA = nullptr; -static ZcashStratumClientAVXCUDASA80_SA* scSigAVXCSA80_SA = nullptr; static ZcashStratumClientSSE2CUDA75_SA* scSigSSE2C75_SA = nullptr; +static ZcashStratumClientAVXCUDASA80_SA* scSigAVXCSA80_SA = nullptr; +static ZcashStratumClientSSE2CUDASA80_SA* scSigSSE2CSA80_SA = nullptr; + extern "C" void stratum_sigint_handler(int signum) { @@ -460,87 +465,75 @@ int main(int argc, char* argv[]) std::string port = delim != std::string::npos ? location.substr(delim + 1) : "2142"; if (use_old_xmp) { - if (use_avx) - { - if (use_old_cuda) - { + if (use_avx) { + if (use_cuda_sa) { + start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, + host, port, user, password, scSigAVXCSA80_XMP); + } else if (use_old_cuda) { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigAVXC75_XMP); - } - else - { + } else { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigAVXC80_XMP); } - } - else - { - if (use_old_cuda) - { + } else { + if (use_cuda_sa) { + start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, + host, port, user, password, scSigSSE2CSA80_XMP); + } else if (use_old_cuda) { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigSSE2C75_XMP); - } - else - { + } else { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigSSE2C80_XMP); } } - } - else { // sarmy - if (use_avx) - { + } else { // sarmy + if (use_avx) { if (use_cuda_sa) { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigAVXCSA80_SA); - } - else if (use_old_cuda) - { + } else if (use_old_cuda) { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigAVXC75_SA); - } - else - { + } else { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigAVXC80_SA); } - } - else - { - if (use_old_cuda) - { + } else { + if (use_cuda_sa) { + start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, + host, port, user, password, scSigSSE2CSA80_SA); + } else if (use_old_cuda) { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigSSE2C75_SA); - } - else - { + } else { start_mining(api_port, num_threads, cuda_device_count, opencl_device_count, opencl_platform, host, port, user, password, scSigSSE2C80_SA); } } } - } - else - { + } else { if (use_old_xmp) { - if (use_avx) - { - if (use_old_cuda) - ZMinerAVXCUDA75_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); - else - ZMinerAVXCUDA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); - } - else - { - if (use_old_cuda) - ZMinerSSE2CUDA75_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); - else - ZMinerSSE2CUDA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + if (use_avx) { + if (use_cuda_sa) { + ZMinerAVXCUDASA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else if (use_old_cuda) { + ZMinerAVXCUDA75_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else { + ZMinerAVXCUDA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } + } else { + if (use_cuda_sa) { + ZMinerSSE2CUDASA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else if (use_old_cuda) { + ZMinerSSE2CUDA75_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else { + ZMinerSSE2CUDA80_XMP_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } } - } - else { // sarmy - if (use_avx) - { + } else { // sarmy + if (use_avx) { if (use_cuda_sa) { ZMinerAVXCUDASA80_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); } else if (use_old_cuda) { @@ -548,13 +541,14 @@ int main(int argc, char* argv[]) } else { ZMinerAVXCUDA80_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); } - } - else - { - if (use_old_cuda) - ZMinerSSE2CUDA75_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); - else - ZMinerSSE2CUDA80_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else { + if (use_cuda_sa) { + ZMinerSSE2CUDASA80_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else if (use_old_cuda) { + ZMinerSSE2CUDA75_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } else { + ZMinerSSE2CUDA80_SA_doBenchmark(num_hashes, num_threads, cuda_device_count, cuda_enabled, cuda_blocks, cuda_tpb, opencl_device_count, opencl_platform, opencl_enabled, opencl_threads); + } } } }