diff options
author | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-29 21:43:43 +0200 |
---|---|---|
committer | psychocrypt <psychocrypt@users.noreply.github.com> | 2017-09-30 23:46:08 +0200 |
commit | 8babae3156430f5aa6b804f7c352ffb178097963 (patch) | |
tree | 6c09c50e518c1d6342c06b3890f71043fc0e90b5 /xmrstak/backend | |
parent | 4526840bb6347eaed7d80a807357f969f9c68a40 (diff) | |
download | xmr-stak-8babae3156430f5aa6b804f7c352ffb178097963.zip xmr-stak-8babae3156430f5aa6b804f7c352ffb178097963.tar.gz |
cleanup includes
Diffstat (limited to 'xmrstak/backend')
27 files changed, 160 insertions, 149 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index 04e442a..deb0fc7 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -23,7 +23,6 @@ #ifdef _WIN32 #include <windows.h> -const char* sSourcePath = "opencl\\cryptonight.cl"; static inline void port_sleep(size_t sec) { @@ -31,7 +30,6 @@ static inline void port_sleep(size_t sec) } #else #include <unistd.h> -const char* sSourcePath = "opencl/cryptonight.cl"; static inline void port_sleep(size_t sec) { @@ -46,7 +44,7 @@ static inline long long unsigned int int_port(size_t i) } #endif -#include "gpu.h" +#include "gpu.hpp" const char* err_to_str(cl_int ret) { diff --git a/xmrstak/backend/amd/amd_gpu/gpu.hpp b/xmrstak/backend/amd/amd_gpu/gpu.hpp index 8a71cfa..5ff7ea1 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.hpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.hpp @@ -1,5 +1,7 @@ #pragma once +#include "xmrstak/misc/console.hpp" + #if defined(__APPLE__) #include <OpenCL/cl.h> #else @@ -8,7 +10,6 @@ #include <stdint.h> #include <vector> -#include "../../../console.h" #define ERR_SUCCESS (0) #define ERR_OCL_API (2) diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp index 442d8f1..84541ae 100644 --- a/xmrstak/backend/amd/autoAdjust.hpp +++ b/xmrstak/backend/amd/autoAdjust.hpp @@ -1,14 +1,13 @@ #pragma once +#include "amd_gpu/gpu.hpp" #include "autoAdjust.hpp" +#include "jconf.hpp" - -#include "jconf.h" -#include "../../console.h" -#include "../../ConfigEditor.hpp" -#include "amd_gpu/gpu.h" -#include "../../Params.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/params.hpp" #include <vector> #include <cstdio> diff --git a/xmrstak/backend/amd/jconf.cpp b/xmrstak/backend/amd/jconf.cpp index f8a551e..2132ebf 100644 --- a/xmrstak/backend/amd/jconf.cpp +++ b/xmrstak/backend/amd/jconf.cpp @@ -22,11 +22,9 @@ */ -#include "jconf.h" - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> +#include "jconf.hpp" +#include "xmrstak/misc/jext.hpp" +#include "xmrstak/misc/console.hpp" #ifdef _WIN32 #define strcasecmp _stricmp @@ -35,10 +33,10 @@ #include <cpuid.h> #endif -#include "../../rapidjson/document.h" -#include "../../rapidjson/error/en.h" -#include "../../jext.h" -#include "../../console.h" +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + namespace xmrstak { diff --git a/xmrstak/backend/amd/jconf.hpp b/xmrstak/backend/amd/jconf.hpp index 9fef331..db41dff 100644 --- a/xmrstak/backend/amd/jconf.hpp +++ b/xmrstak/backend/amd/jconf.hpp @@ -1,7 +1,9 @@ #pragma once + +#include "xmrstak/params.hpp" + #include <stdlib.h> #include <string> -#include "../../Params.hpp" namespace xmrstak { diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp index f2f5ff4..b2f5620 100644 --- a/xmrstak/backend/amd/minethd.cpp +++ b/xmrstak/backend/amd/minethd.cpp @@ -21,28 +21,25 @@ * */ +#include "minethd.hpp" +#include "autoAdjust.hpp" +#include "amd_gpu/gpu.hpp" + +#include "xmrstak/backend/cpu/crypto/cryptonight_aesni.h" +#include "xmrstak/backend/cpu/crypto/cryptonight.h" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/backend/cpu/minethd.hpp" +#include "xmrstak/jconf.hpp" +#include "xmrstak/misc/executor.hpp" +#include "xmrstak/misc/environment.hpp" +#include "xmrstak/params.hpp" + #include <assert.h> #include <cmath> #include <chrono> #include <thread> - -#include "../../ConfigEditor.hpp" -#include "autoAdjust.hpp" - #include <vector> -#include "../../console.h" -#include "../../crypto/cryptonight_aesni.h" -#include "../cpu/minethd.h" -#include "../../jconf.h" - -#include "../../executor.h" -#include "minethd.h" -#include "../../jconf.h" -#include "../../crypto/cryptonight.h" -#include "../../Environment.hpp" -#include "../../Params.hpp" -#include "amd_gpu/gpu.h" - namespace xmrstak { diff --git a/xmrstak/backend/amd/minethd.hpp b/xmrstak/backend/amd/minethd.hpp index 4fb3b13..7e71082 100644 --- a/xmrstak/backend/amd/minethd.hpp +++ b/xmrstak/backend/amd/minethd.hpp @@ -1,11 +1,12 @@ #pragma once + +#include "amd_gpu/gpu.hpp" +#include "jconf.hpp" +#include "xmrstak/backend/iBackend.hpp" +#include "xmrstak/misc/environment.hpp" + #include <thread> #include <atomic> -#include "./jconf.h" -#include "../IBackend.hpp" -#include "../../Environment.hpp" - -#include "amd_gpu/gpu.h" namespace xmrstak { diff --git a/xmrstak/backend/backendConnector.cpp b/xmrstak/backend/backendConnector.cpp index 1013f79..d07b54d 100644 --- a/xmrstak/backend/backendConnector.cpp +++ b/xmrstak/backend/backendConnector.cpp @@ -21,6 +21,24 @@ * */ +#include "iBackend.hpp" +#include "backendConnector.hpp" +#include "miner_work.hpp" +#include "globalStates.hpp" +#include "plugin.hpp" +#include "xmrstak/misc/environment.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/params.hpp" + +#include "cpu/minethd.hpp" +#ifndef CONF_NO_CUDA +# include "nvidia/minethd.hpp" +#endif +#ifndef CONF_NO_OPENCL +# include "amd/minethd.hpp" +#endif + +#include <cstdlib> #include <assert.h> #include <cmath> #include <chrono> @@ -28,29 +46,10 @@ #include <thread> #include <bitset> -#include "IBackend.hpp" -#include "BackendConnector.hpp" - -#include "cpu/minethd.h" -#ifndef CONF_NO_CUDA -# include "nvidia/minethd.h" -#endif -#ifndef CONF_NO_OPENCL -# include "amd/minethd.h" -#endif -#include "miner_work.h" -#include "GlobalStates.hpp" - #include <cstdlib> - -#include "Plugin.hpp" -#include "../Environment.hpp" -#include "../console.h" -#include "../Params.hpp" namespace xmrstak { - bool BackendConnector::self_test() { diff --git a/xmrstak/backend/backendConnector.hpp b/xmrstak/backend/backendConnector.hpp index 024d9b1..f573abc 100644 --- a/xmrstak/backend/backendConnector.hpp +++ b/xmrstak/backend/backendConnector.hpp @@ -1,10 +1,13 @@ #pragma once + +#include "iBackend.hpp" +#include "miner_work.hpp" + #include <thread> #include <vector> #include <atomic> #include <mutex> -#include "IBackend.hpp" -#include "miner_work.h" + namespace xmrstak { diff --git a/xmrstak/backend/cpu/autoAdjust.hpp b/xmrstak/backend/cpu/autoAdjust.hpp index 32c8576..f686224 100644 --- a/xmrstak/backend/cpu/autoAdjust.hpp +++ b/xmrstak/backend/cpu/autoAdjust.hpp @@ -1,9 +1,11 @@ #pragma once -#include "jconf.h" -#include "../../console.h" -#include "../../jconf.h" -#include "../../ConfigEditor.hpp" -#include "../../Params.hpp" + +#include "jconf.hpp" + +#include "xmrstak/misc/console.hpp" +#include "xmrstak/jconf.hpp" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/params.hpp" #include <string> #ifdef _WIN32 diff --git a/xmrstak/backend/cpu/autoAdjustHwloc.hpp b/xmrstak/backend/cpu/autoAdjustHwloc.hpp index e1916e0..055a7f5 100644 --- a/xmrstak/backend/cpu/autoAdjustHwloc.hpp +++ b/xmrstak/backend/cpu/autoAdjustHwloc.hpp @@ -1,9 +1,8 @@ #pragma once -#include "../../console.h" -#include <hwloc.h> -#include <stdio.h> -#include "../../Params.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/params.hpp" #ifdef _WIN32 #include <windows.h> @@ -12,7 +11,10 @@ #endif // _WIN32 #include <string> -#include "../../ConfigEditor.hpp" + +#include <hwloc.h> +#include <stdio.h> + namespace xmrstak { diff --git a/xmrstak/backend/cpu/hwlocMemory.hpp b/xmrstak/backend/cpu/hwlocMemory.hpp index f471951..719c1bb 100644 --- a/xmrstak/backend/cpu/hwlocMemory.hpp +++ b/xmrstak/backend/cpu/hwlocMemory.hpp @@ -1,6 +1,6 @@ #pragma once -#include "console.h" +#include "xmrstak/misc/console.hpp" #ifndef CONF_NO_HWLOC diff --git a/xmrstak/backend/cpu/jconf.cpp b/xmrstak/backend/cpu/jconf.cpp index 021d607..2ded8c0 100644 --- a/xmrstak/backend/cpu/jconf.cpp +++ b/xmrstak/backend/cpu/jconf.cpp @@ -21,13 +21,14 @@ * */ -#include "jconf.h" -#include "../../console.h" -#include <iostream> +#include "jconf.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/misc/jext.hpp" +#include <iostream> #include <stdio.h> #include <stdlib.h> -#include <string.h> +#include <string> #ifdef _WIN32 #define strcasecmp _stricmp @@ -36,9 +37,6 @@ #include <cpuid.h> #endif -#include "../../rapidjson/document.h" -#include "../../rapidjson/error/en.h" -#include "../../jext.h" namespace xmrstak { diff --git a/xmrstak/backend/cpu/jconf.hpp b/xmrstak/backend/cpu/jconf.hpp index 1f92765..03dfcc1 100644 --- a/xmrstak/backend/cpu/jconf.hpp +++ b/xmrstak/backend/cpu/jconf.hpp @@ -1,7 +1,9 @@ #pragma once + +#include "xmrstak/params.hpp" + #include <stdlib.h> #include <string> -#include "../../Params.hpp" namespace xmrstak { diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp index 3ffdf99..6037161 100644 --- a/xmrstak/backend/cpu/minethd.cpp +++ b/xmrstak/backend/cpu/minethd.cpp @@ -27,19 +27,19 @@ #include <cstring> #include <thread> #include <bitset> -#include "../../console.h" -#include "../IBackend.hpp" -#include "../GlobalStates.hpp" -#include "../../ConfigEditor.hpp" -#include "../../Params.hpp" -#include "../../jconf.h" - -#include "../../executor.h" -#include "minethd.h" -#include "./jconf.h" -#include "../../crypto/cryptonight_aesni.h" -#include "../../hwlocMemory.hpp" -#include "../miner_work.h" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/backend/iBackend.hpp" +#include "xmrstak/backend//globalStates.hpp" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/params.hpp" +#include "xmrstak/jconf.hpp" + +#include "xmrstak/misc/executor.hpp" +#include "minethd.hpp" +#include "xmrstak/jconf.hpp" +#include "xmrstak/backend/crypto/cryptonight_aesni.h" +#include "hwlocMemory.hpp" +#include "xmrstak/backend/miner_work.hpp" #ifndef CONF_NO_HWLOC # include "autoAdjustHwloc.hpp" diff --git a/xmrstak/backend/cpu/minethd.hpp b/xmrstak/backend/cpu/minethd.hpp index 40383cf..1dcca86 100644 --- a/xmrstak/backend/cpu/minethd.hpp +++ b/xmrstak/backend/cpu/minethd.hpp @@ -1,13 +1,15 @@ #pragma once + +#include "crypto/cryptonight.h" +#include "xmrstak/backend/miner_work.hpp" +#include "xmrstak/backend/iBackend.hpp" +#include "xmrstak/backend/globalStates.hpp" + +#include <iostream> #include <thread> #include <vector> #include <atomic> #include <mutex> -#include "../../crypto/cryptonight.h" -#include "../miner_work.h" -#include "../IBackend.hpp" -#include "../GlobalStates.hpp" -#include <iostream> namespace xmrstak { diff --git a/xmrstak/backend/globalStates.cpp b/xmrstak/backend/globalStates.cpp index 5251da8..ef582c1 100644 --- a/xmrstak/backend/globalStates.cpp +++ b/xmrstak/backend/globalStates.cpp @@ -21,15 +21,15 @@ * */ +#include "miner_work.hpp" +#include "globalStates.hpp" + #include <assert.h> #include <cmath> #include <chrono> #include <cstring> -#include "miner_work.h" -#include "GlobalStates.hpp" - namespace xmrstak { diff --git a/xmrstak/backend/globalStates.hpp b/xmrstak/backend/globalStates.hpp index a9818ba..58248bd 100644 --- a/xmrstak/backend/globalStates.hpp +++ b/xmrstak/backend/globalStates.hpp @@ -1,7 +1,10 @@ #pragma once + +#include "miner_work.hpp" +#include "xmrstak/misc/environment.hpp" + #include <atomic> -#include "miner_work.h" -#include "../Environment.hpp" + namespace xmrstak { diff --git a/xmrstak/backend/miner_work.hpp b/xmrstak/backend/miner_work.hpp index 8349fda..c471546 100644 --- a/xmrstak/backend/miner_work.hpp +++ b/xmrstak/backend/miner_work.hpp @@ -1,4 +1,5 @@ #pragma once + #include <thread> #include <atomic> #include <mutex> diff --git a/xmrstak/backend/nvidia/autoAdjust.hpp b/xmrstak/backend/nvidia/autoAdjust.hpp index 84c6dfc..4107510 100644 --- a/xmrstak/backend/nvidia/autoAdjust.hpp +++ b/xmrstak/backend/nvidia/autoAdjust.hpp @@ -3,11 +3,11 @@ #include "autoAdjust.hpp" -#include "nvcc_code/cryptonight.h" -#include "jconf.h" -#include "../../console.h" -#include "../../ConfigEditor.hpp" -#include "../../Params.hpp" +#include "nvcc_code/cryptonight.hpp" +#include "jconf.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/misc/configEditor.hpp" +#include "xmrstak/params.hpp" #include <vector> #include <cstdio> diff --git a/xmrstak/backend/nvidia/jconf.cpp b/xmrstak/backend/nvidia/jconf.cpp index 2184acd..7a94d19 100644 --- a/xmrstak/backend/nvidia/jconf.cpp +++ b/xmrstak/backend/nvidia/jconf.cpp @@ -21,7 +21,9 @@ * */ -#include "jconf.h" +#include "jconf.hpp" +#include "xmrstak/miscjext.hpp" +#include "xmrstak/misc/console.hpp" #include <stdio.h> #include <stdlib.h> @@ -34,10 +36,6 @@ #include <cpuid.h> #endif -#include "../../rapidjson/document.h" -#include "../../rapidjson/error/en.h" -#include "../../jext.h" -#include "../../console.h" namespace xmrstak { diff --git a/xmrstak/backend/nvidia/jconf.hpp b/xmrstak/backend/nvidia/jconf.hpp index 8959088..2093408 100644 --- a/xmrstak/backend/nvidia/jconf.hpp +++ b/xmrstak/backend/nvidia/jconf.hpp @@ -1,7 +1,7 @@ #pragma once #include <stdlib.h> #include <string> -#include "../../Params.hpp" +#include "xmrstak/params.hpp" namespace xmrstak { diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp index cbee219..7718d34 100644 --- a/xmrstak/backend/nvidia/minethd.cpp +++ b/xmrstak/backend/nvidia/minethd.cpp @@ -21,24 +21,23 @@ * */ +#include "minethd.hpp" +#include "autoAdjust.hpp" +#include "xmrstak/misc/console.hpp" +#include "xmrstak/backend/cpu/crypto/cryptonight_aesni.h" +#include "xmrstak/backend/cpu/crypto/cryptonight.h" +#include "xmrstak/backend/cpu//cpu/minethd.hpp" +#include "xmrstak/params.hpp" +#include "xmrstak/misc/executor.hpp" +#include "xmrstak/jconf.hpp" +#include "xmrstak/misc/environment.hpp" + #include <assert.h> #include <cmath> #include <chrono> #include <thread> #include <bitset> #include <vector> -#include "../../console.h" -#include "../../crypto/cryptonight_aesni.h" -#include "../cpu/minethd.h" -#include "../../Params.hpp" - -#include "../../executor.h" -#include "minethd.h" -#include "../../jconf.h" -#include "../../crypto/cryptonight.h" -#include "../../Environment.hpp" -#include "autoAdjust.hpp" - #ifndef USE_PRECOMPILED_HEADERS #ifdef WIN32 diff --git a/xmrstak/backend/nvidia/minethd.hpp b/xmrstak/backend/nvidia/minethd.hpp index 9f3993e..ecf189a 100644 --- a/xmrstak/backend/nvidia/minethd.hpp +++ b/xmrstak/backend/nvidia/minethd.hpp @@ -1,14 +1,18 @@ #pragma once + +#include "xmrstak/jconf.hpp" +#include "jconf.hpp" +#include "nvcc_code/cryptonight.h" + +#include "xmrstak/bakcend/cpu/crypto/cryptonight.h" +#include "xmrstak/backend/iBackend.hpp" +#include "xmrstak/misc/environment.hpp" + +#include <iostream> #include <thread> #include <atomic> #include <vector> -#include "nvcc_code/cryptonight.h" -#include "../../crypto/cryptonight.h" -#include "../../jconf.h" -#include "./jconf.h" -#include "../IBackend.hpp" -#include "../../Environment.hpp" -#include <iostream> + namespace xmrstak { diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu index 7590cf5..0c086e8 100644 --- a/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu +++ b/xmrstak/backend/nvidia/nvcc_code/cuda_core.cu @@ -49,8 +49,8 @@ extern "C" void compat_usleep(uint64_t waitTime) } #endif -#include "cryptonight.h" -#include "cuda_extra.h" +#include "cryptonight.hpp" +#include "cuda_extra.hpp" #include "cuda_aes.hpp" #include "cuda_device.hpp" diff --git a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu index 7052bc8..7734473 100644 --- a/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu +++ b/xmrstak/backend/nvidia/nvcc_code/cuda_extra.cu @@ -25,8 +25,8 @@ uint64_t keccakf_rndc[24] ={ typedef unsigned char BitSequence; typedef unsigned long long DataLength; -#include "cryptonight.h" -#include "cuda_extra.h" +#include "cryptonight.hpp" +#include "cuda_extra.hpp" #include "cuda_keccak.hpp" #include "cuda_blake.hpp" #include "cuda_groestl.hpp" diff --git a/xmrstak/backend/plugin.hpp b/xmrstak/backend/plugin.hpp index 9ba9716..38f8e53 100644 --- a/xmrstak/backend/plugin.hpp +++ b/xmrstak/backend/plugin.hpp @@ -1,21 +1,23 @@ #pragma once + +#include "xmrstak/misc/environment.hpp" + #include <thread> #include <atomic> #include <vector> #include <string> -#include "IBackend.hpp" +#include "iBackend.hpp" #include <iostream> -#include "../Environment.hpp" #ifndef USE_PRECOMPILED_HEADERS -#ifdef WIN32 -#include <direct.h> -#include <windows.h> -#else -#include <sys/types.h> -#include <dlfcn.h> -#endif -#include <iostream> +# ifdef WIN32 +# include <direct.h> +# include <windows.h> +# else +# include <sys/types.h> +# include <dlfcn.h> +# endif +# include <iostream> #endif namespace xmrstak |