summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-16 12:21:38 +0100
committerpsychocrypt <psychocrypt@users.noreply.github.com>2017-11-16 12:21:38 +0100
commitd0b99bb4c69565b2a53f783f88314a1a1955e999 (patch)
tree6ef9b5be97ee0171af88c16886b5c34766e0521e
parent1dc874c542a23c36dd65ea0f5b9cb65e3c3a572a (diff)
downloadxmr-stak-d0b99bb4c69565b2a53f783f88314a1a1955e999.zip
xmr-stak-d0b99bb4c69565b2a53f783f88314a1a1955e999.tar.gz
remove space indention with tabs
- removed all space indention in `*.hpp` and `*.cpp` files
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.cpp62
-rw-r--r--xmrstak/backend/amd/autoAdjust.hpp54
-rw-r--r--xmrstak/backend/amd/minethd.cpp4
-rw-r--r--xmrstak/backend/backendConnector.cpp2
-rw-r--r--xmrstak/backend/cpu/crypto/soft_aes.hpp66
-rw-r--r--xmrstak/backend/cpu/minethd.cpp6
-rw-r--r--xmrstak/backend/nvidia/autoAdjust.hpp96
-rw-r--r--xmrstak/backend/nvidia/minethd.cpp10
-rw-r--r--xmrstak/backend/plugin.hpp8
-rw-r--r--xmrstak/cli/cli-miner.cpp4
-rw-r--r--xmrstak/http/httpd.cpp16
-rw-r--r--xmrstak/http/httpd.hpp14
-rw-r--r--xmrstak/misc/configEditor.hpp2
-rw-r--r--xmrstak/net/jpsock.cpp4
-rw-r--r--xmrstak/net/msgstruct.hpp4
15 files changed, 176 insertions, 176 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index 22ce5d0..135cac0 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -386,42 +386,42 @@ size_t InitOpenCLGpu(cl_context opencl_ctx, GpuContext* ctx, const char* source_
}
const cl_platform_info attributeTypes[5] = {
- CL_PLATFORM_NAME,
- CL_PLATFORM_VENDOR,
- CL_PLATFORM_VERSION,
- CL_PLATFORM_PROFILE,
- CL_PLATFORM_EXTENSIONS
+ CL_PLATFORM_NAME,
+ CL_PLATFORM_VENDOR,
+ CL_PLATFORM_VERSION,
+ CL_PLATFORM_PROFILE,
+ CL_PLATFORM_EXTENSIONS
};
const char* const attributeNames[] = {
- "CL_PLATFORM_NAME",
- "CL_PLATFORM_VENDOR",
- "CL_PLATFORM_VERSION",
- "CL_PLATFORM_PROFILE",
- "CL_PLATFORM_EXTENSIONS"
+ "CL_PLATFORM_NAME",
+ "CL_PLATFORM_VENDOR",
+ "CL_PLATFORM_VERSION",
+ "CL_PLATFORM_PROFILE",
+ "CL_PLATFORM_EXTENSIONS"
};
#define NELEMS(x) (sizeof(x) / sizeof((x)[0]))
void PrintDeviceInfo(cl_device_id device)
{
- char queryBuffer[1024];
- int queryInt;
- cl_int clError;
- clError = clGetDeviceInfo(device, CL_DEVICE_NAME, sizeof(queryBuffer), &queryBuffer, NULL);
- printf(" CL_DEVICE_NAME: %s\n", queryBuffer);
- queryBuffer[0] = '\0';
- clError = clGetDeviceInfo(device, CL_DEVICE_VENDOR, sizeof(queryBuffer), &queryBuffer, NULL);
- printf(" CL_DEVICE_VENDOR: %s\n", queryBuffer);
- queryBuffer[0] = '\0';
- clError = clGetDeviceInfo(device, CL_DRIVER_VERSION, sizeof(queryBuffer), &queryBuffer, NULL);
- printf(" CL_DRIVER_VERSION: %s\n", queryBuffer);
- queryBuffer[0] = '\0';
- clError = clGetDeviceInfo(device, CL_DEVICE_VERSION, sizeof(queryBuffer), &queryBuffer, NULL);
- printf(" CL_DEVICE_VERSION: %s\n", queryBuffer);
- queryBuffer[0] = '\0';
- clError = clGetDeviceInfo(device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(int), &queryInt, NULL);
- printf(" CL_DEVICE_MAX_COMPUTE_UNITS: %d\n", queryInt);
+ char queryBuffer[1024];
+ int queryInt;
+ cl_int clError;
+ clError = clGetDeviceInfo(device, CL_DEVICE_NAME, sizeof(queryBuffer), &queryBuffer, NULL);
+ printf(" CL_DEVICE_NAME: %s\n", queryBuffer);
+ queryBuffer[0] = '\0';
+ clError = clGetDeviceInfo(device, CL_DEVICE_VENDOR, sizeof(queryBuffer), &queryBuffer, NULL);
+ printf(" CL_DEVICE_VENDOR: %s\n", queryBuffer);
+ queryBuffer[0] = '\0';
+ clError = clGetDeviceInfo(device, CL_DRIVER_VERSION, sizeof(queryBuffer), &queryBuffer, NULL);
+ printf(" CL_DRIVER_VERSION: %s\n", queryBuffer);
+ queryBuffer[0] = '\0';
+ clError = clGetDeviceInfo(device, CL_DEVICE_VERSION, sizeof(queryBuffer), &queryBuffer, NULL);
+ printf(" CL_DEVICE_VERSION: %s\n", queryBuffer);
+ queryBuffer[0] = '\0';
+ clError = clGetDeviceInfo(device, CL_DEVICE_MAX_COMPUTE_UNITS, sizeof(int), &queryInt, NULL);
+ printf(" CL_DEVICE_MAX_COMPUTE_UNITS: %d\n", queryInt);
}
uint32_t getNumPlatforms()
@@ -449,8 +449,8 @@ std::vector<GpuContext> getAMDDevices(int index)
uint32_t numPlatforms = getNumPlatforms();
- platforms = (cl_platform_id *) malloc(sizeof(cl_platform_id) * numPlatforms);
- clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
+ platforms = (cl_platform_id *) malloc(sizeof(cl_platform_id) * numPlatforms);
+ clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
clStatus = clGetDeviceIDs( platforms[index], CL_DEVICE_TYPE_GPU, 0, NULL, &num_devices);
device_list = (cl_device_id *) malloc(sizeof(cl_device_id)*num_devices);
@@ -500,7 +500,7 @@ int getAMDPlatformIdx()
cl_int clStatus;
platforms = (cl_platform_id *) malloc(sizeof(cl_platform_id) * numPlatforms);
- clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
+ clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
int platformIndex = -1;
@@ -554,7 +554,7 @@ size_t InitOpenCL(GpuContext* ctx, size_t num_gpus, size_t platform_idx)
uint32_t numPlatforms = getNumPlatforms();
platforms = (cl_platform_id *) malloc(sizeof(cl_platform_id) * numPlatforms);
- clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
+ clStatus = clGetPlatformIDs(numPlatforms, platforms, NULL);
size_t infoSize;
clGetPlatformInfo(platforms[platform_idx], CL_PLATFORM_VENDOR, 0, NULL, &infoSize);
diff --git a/xmrstak/backend/amd/autoAdjust.hpp b/xmrstak/backend/amd/autoAdjust.hpp
index 41dd11a..0b91212 100644
--- a/xmrstak/backend/amd/autoAdjust.hpp
+++ b/xmrstak/backend/amd/autoAdjust.hpp
@@ -34,18 +34,18 @@ class autoAdjust
{
public:
- autoAdjust()
- {
-
- }
-
- /** print the adjusted values if needed
- *
- * Routine exit the application and print the adjusted values if needed else
- * nothing is happened.
- */
- bool printConfig()
- {
+ autoAdjust()
+ {
+
+ }
+
+ /** print the adjusted values if needed
+ *
+ * Routine exit the application and print the adjusted values if needed else
+ * nothing is happened.
+ */
+ bool printConfig()
+ {
int platformIndex = getAMDPlatformIdx();
if(platformIndex == -1)
@@ -65,14 +65,14 @@ public:
return false;
}
- generateThreadConfig(platformIndex);
+ generateThreadConfig(platformIndex);
return true;
- }
+ }
private:
- void generateThreadConfig(const int platformIndex)
- {
+ void generateThreadConfig(const int platformIndex)
+ {
// load the template of the backend config into a char variable
const char *tpl =
#include "./config.tpl"
@@ -94,9 +94,9 @@ private:
}
std::string conf;
- int i = 0;
- for(auto& ctx : devVec)
- {
+ int i = 0;
+ for(auto& ctx : devVec)
+ {
/* 1000 is a magic selected limit, the reason is that more than 2GiB memory
* sowing down the memory performance because of TLB cache misses
*/
@@ -121,20 +121,20 @@ private:
conf += std::string(" // gpu: ") + ctx.name + " memory:" + std::to_string(availableMem / byteToMiB) + "\n";
conf += std::string(" // compute units: ") + std::to_string(ctx.computeUnits) + "\n";
// set 8 threads per block (this is a good value for the most gpus)
- conf += std::string(" { \"index\" : ") + std::to_string(ctx.deviceIdx) + ",\n" +
- " \"intensity\" : " + std::to_string(intensity) + ", \"worksize\" : " + std::to_string(8) + ",\n" +
- " \"affine_to_cpu\" : false, \n"
- " },\n";
- ++i;
- }
+ conf += std::string(" { \"index\" : ") + std::to_string(ctx.deviceIdx) + ",\n" +
+ " \"intensity\" : " + std::to_string(intensity) + ", \"worksize\" : " + std::to_string(8) + ",\n" +
+ " \"affine_to_cpu\" : false, \n"
+ " },\n";
+ ++i;
+ }
configTpl.replace("PLATFORMINDEX",std::to_string(platformIndex));
configTpl.replace("GPUCONFIG",conf);
configTpl.write(params::inst().configFileAMD);
printer::inst()->print_msg(L0, "AMD: GPU configuration stored in file '%s'", params::inst().configFileAMD.c_str());
- }
+ }
- std::vector<GpuContext> devVec;
+ std::vector<GpuContext> devVec;
};
} // namespace amd
diff --git a/xmrstak/backend/amd/minethd.cpp b/xmrstak/backend/amd/minethd.cpp
index de0b6e8..07c60eb 100644
--- a/xmrstak/backend/amd/minethd.cpp
+++ b/xmrstak/backend/amd/minethd.cpp
@@ -196,8 +196,8 @@ void minethd::work_main()
if (oWork.bStall)
{
/* We are stalled here because the executor didn't find a job for us yet,
- either because of network latency, or a socket problem. Since we are
- raison d'etre of this software it us sensible to just wait until we have something*/
+ either because of network latency, or a socket problem. Since we are
+ raison d'etre of this software it us sensible to just wait until we have something*/
while (globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
std::this_thread::sleep_for(std::chrono::milliseconds(100));
diff --git a/xmrstak/backend/backendConnector.cpp b/xmrstak/backend/backendConnector.cpp
index 28ba1ac..ef22741 100644
--- a/xmrstak/backend/backendConnector.cpp
+++ b/xmrstak/backend/backendConnector.cpp
@@ -57,7 +57,7 @@ bool BackendConnector::self_test()
std::vector<iBackend*>* BackendConnector::thread_starter(miner_work& pWork)
{
- globalStates::inst().iGlobalJobNo = 0;
+ globalStates::inst().iGlobalJobNo = 0;
globalStates::inst().iConsumeCnt = 0;
diff --git a/xmrstak/backend/cpu/crypto/soft_aes.hpp b/xmrstak/backend/cpu/crypto/soft_aes.hpp
index d36f1fb..d3f4637 100644
--- a/xmrstak/backend/cpu/crypto/soft_aes.hpp
+++ b/xmrstak/backend/cpu/crypto/soft_aes.hpp
@@ -35,43 +35,43 @@
#include <inttypes.h>
#define saes_data(w) {\
- w(0x63), w(0x7c), w(0x77), w(0x7b), w(0xf2), w(0x6b), w(0x6f), w(0xc5),\
- w(0x30), w(0x01), w(0x67), w(0x2b), w(0xfe), w(0xd7), w(0xab), w(0x76),\
- w(0xca), w(0x82), w(0xc9), w(0x7d), w(0xfa), w(0x59), w(0x47), w(0xf0),\
- w(0xad), w(0xd4), w(0xa2), w(0xaf), w(0x9c), w(0xa4), w(0x72), w(0xc0),\
- w(0xb7), w(0xfd), w(0x93), w(0x26), w(0x36), w(0x3f), w(0xf7), w(0xcc),\
- w(0x34), w(0xa5), w(0xe5), w(0xf1), w(0x71), w(0xd8), w(0x31), w(0x15),\
- w(0x04), w(0xc7), w(0x23), w(0xc3), w(0x18), w(0x96), w(0x05), w(0x9a),\
- w(0x07), w(0x12), w(0x80), w(0xe2), w(0xeb), w(0x27), w(0xb2), w(0x75),\
- w(0x09), w(0x83), w(0x2c), w(0x1a), w(0x1b), w(0x6e), w(0x5a), w(0xa0),\
- w(0x52), w(0x3b), w(0xd6), w(0xb3), w(0x29), w(0xe3), w(0x2f), w(0x84),\
- w(0x53), w(0xd1), w(0x00), w(0xed), w(0x20), w(0xfc), w(0xb1), w(0x5b),\
- w(0x6a), w(0xcb), w(0xbe), w(0x39), w(0x4a), w(0x4c), w(0x58), w(0xcf),\
- w(0xd0), w(0xef), w(0xaa), w(0xfb), w(0x43), w(0x4d), w(0x33), w(0x85),\
- w(0x45), w(0xf9), w(0x02), w(0x7f), w(0x50), w(0x3c), w(0x9f), w(0xa8),\
- w(0x51), w(0xa3), w(0x40), w(0x8f), w(0x92), w(0x9d), w(0x38), w(0xf5),\
- w(0xbc), w(0xb6), w(0xda), w(0x21), w(0x10), w(0xff), w(0xf3), w(0xd2),\
- w(0xcd), w(0x0c), w(0x13), w(0xec), w(0x5f), w(0x97), w(0x44), w(0x17),\
- w(0xc4), w(0xa7), w(0x7e), w(0x3d), w(0x64), w(0x5d), w(0x19), w(0x73),\
- w(0x60), w(0x81), w(0x4f), w(0xdc), w(0x22), w(0x2a), w(0x90), w(0x88),\
- w(0x46), w(0xee), w(0xb8), w(0x14), w(0xde), w(0x5e), w(0x0b), w(0xdb),\
- w(0xe0), w(0x32), w(0x3a), w(0x0a), w(0x49), w(0x06), w(0x24), w(0x5c),\
- w(0xc2), w(0xd3), w(0xac), w(0x62), w(0x91), w(0x95), w(0xe4), w(0x79),\
- w(0xe7), w(0xc8), w(0x37), w(0x6d), w(0x8d), w(0xd5), w(0x4e), w(0xa9),\
- w(0x6c), w(0x56), w(0xf4), w(0xea), w(0x65), w(0x7a), w(0xae), w(0x08),\
- w(0xba), w(0x78), w(0x25), w(0x2e), w(0x1c), w(0xa6), w(0xb4), w(0xc6),\
- w(0xe8), w(0xdd), w(0x74), w(0x1f), w(0x4b), w(0xbd), w(0x8b), w(0x8a),\
- w(0x70), w(0x3e), w(0xb5), w(0x66), w(0x48), w(0x03), w(0xf6), w(0x0e),\
- w(0x61), w(0x35), w(0x57), w(0xb9), w(0x86), w(0xc1), w(0x1d), w(0x9e),\
- w(0xe1), w(0xf8), w(0x98), w(0x11), w(0x69), w(0xd9), w(0x8e), w(0x94),\
- w(0x9b), w(0x1e), w(0x87), w(0xe9), w(0xce), w(0x55), w(0x28), w(0xdf),\
- w(0x8c), w(0xa1), w(0x89), w(0x0d), w(0xbf), w(0xe6), w(0x42), w(0x68),\
- w(0x41), w(0x99), w(0x2d), w(0x0f), w(0xb0), w(0x54), w(0xbb), w(0x16) }
+ w(0x63), w(0x7c), w(0x77), w(0x7b), w(0xf2), w(0x6b), w(0x6f), w(0xc5),\
+ w(0x30), w(0x01), w(0x67), w(0x2b), w(0xfe), w(0xd7), w(0xab), w(0x76),\
+ w(0xca), w(0x82), w(0xc9), w(0x7d), w(0xfa), w(0x59), w(0x47), w(0xf0),\
+ w(0xad), w(0xd4), w(0xa2), w(0xaf), w(0x9c), w(0xa4), w(0x72), w(0xc0),\
+ w(0xb7), w(0xfd), w(0x93), w(0x26), w(0x36), w(0x3f), w(0xf7), w(0xcc),\
+ w(0x34), w(0xa5), w(0xe5), w(0xf1), w(0x71), w(0xd8), w(0x31), w(0x15),\
+ w(0x04), w(0xc7), w(0x23), w(0xc3), w(0x18), w(0x96), w(0x05), w(0x9a),\
+ w(0x07), w(0x12), w(0x80), w(0xe2), w(0xeb), w(0x27), w(0xb2), w(0x75),\
+ w(0x09), w(0x83), w(0x2c), w(0x1a), w(0x1b), w(0x6e), w(0x5a), w(0xa0),\
+ w(0x52), w(0x3b), w(0xd6), w(0xb3), w(0x29), w(0xe3), w(0x2f), w(0x84),\
+ w(0x53), w(0xd1), w(0x00), w(0xed), w(0x20), w(0xfc), w(0xb1), w(0x5b),\
+ w(0x6a), w(0xcb), w(0xbe), w(0x39), w(0x4a), w(0x4c), w(0x58), w(0xcf),\
+ w(0xd0), w(0xef), w(0xaa), w(0xfb), w(0x43), w(0x4d), w(0x33), w(0x85),\
+ w(0x45), w(0xf9), w(0x02), w(0x7f), w(0x50), w(0x3c), w(0x9f), w(0xa8),\
+ w(0x51), w(0xa3), w(0x40), w(0x8f), w(0x92), w(0x9d), w(0x38), w(0xf5),\
+ w(0xbc), w(0xb6), w(0xda), w(0x21), w(0x10), w(0xff), w(0xf3), w(0xd2),\
+ w(0xcd), w(0x0c), w(0x13), w(0xec), w(0x5f), w(0x97), w(0x44), w(0x17),\
+ w(0xc4), w(0xa7), w(0x7e), w(0x3d), w(0x64), w(0x5d), w(0x19), w(0x73),\
+ w(0x60), w(0x81), w(0x4f), w(0xdc), w(0x22), w(0x2a), w(0x90), w(0x88),\
+ w(0x46), w(0xee), w(0xb8), w(0x14), w(0xde), w(0x5e), w(0x0b), w(0xdb),\
+ w(0xe0), w(0x32), w(0x3a), w(0x0a), w(0x49), w(0x06), w(0x24), w(0x5c),\
+ w(0xc2), w(0xd3), w(0xac), w(0x62), w(0x91), w(0x95), w(0xe4), w(0x79),\
+ w(0xe7), w(0xc8), w(0x37), w(0x6d), w(0x8d), w(0xd5), w(0x4e), w(0xa9),\
+ w(0x6c), w(0x56), w(0xf4), w(0xea), w(0x65), w(0x7a), w(0xae), w(0x08),\
+ w(0xba), w(0x78), w(0x25), w(0x2e), w(0x1c), w(0xa6), w(0xb4), w(0xc6),\
+ w(0xe8), w(0xdd), w(0x74), w(0x1f), w(0x4b), w(0xbd), w(0x8b), w(0x8a),\
+ w(0x70), w(0x3e), w(0xb5), w(0x66), w(0x48), w(0x03), w(0xf6), w(0x0e),\
+ w(0x61), w(0x35), w(0x57), w(0xb9), w(0x86), w(0xc1), w(0x1d), w(0x9e),\
+ w(0xe1), w(0xf8), w(0x98), w(0x11), w(0x69), w(0xd9), w(0x8e), w(0x94),\
+ w(0x9b), w(0x1e), w(0x87), w(0xe9), w(0xce), w(0x55), w(0x28), w(0xdf),\
+ w(0x8c), w(0xa1), w(0x89), w(0x0d), w(0xbf), w(0xe6), w(0x42), w(0x68),\
+ w(0x41), w(0x99), w(0x2d), w(0x0f), w(0xb0), w(0x54), w(0xbb), w(0x16) }
#define SAES_WPOLY 0x011b
#define saes_b2w(b0, b1, b2, b3) (((uint32_t)(b3) << 24) | \
- ((uint32_t)(b2) << 16) | ((uint32_t)(b1) << 8) | (b0))
+ ((uint32_t)(b2) << 16) | ((uint32_t)(b1) << 8) | (b0))
#define saes_f2(x) ((x<<1) ^ (((x>>7) & 1) * SAES_WPOLY))
#define saes_f3(x) (saes_f2(x) ^ x)
diff --git a/xmrstak/backend/cpu/minethd.cpp b/xmrstak/backend/cpu/minethd.cpp
index 03071c4..9529058 100644
--- a/xmrstak/backend/cpu/minethd.cpp
+++ b/xmrstak/backend/cpu/minethd.cpp
@@ -234,7 +234,7 @@ bool minethd::self_test()
if(!bResult)
printer::inst()->print_msg(L0,
- "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
+ "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
return bResult;
}
@@ -365,8 +365,8 @@ void minethd::work_main()
if (oWork.bStall)
{
/* We are stalled here because the executor didn't find a job for us yet,
- either because of network latency, or a socket problem. Since we are
- raison d'etre of this software it us sensible to just wait until we have something*/
+ either because of network latency, or a socket problem. Since we are
+ raison d'etre of this software it us sensible to just wait until we have something*/
while (globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
std::this_thread::sleep_for(std::chrono::milliseconds(100));
diff --git a/xmrstak/backend/nvidia/autoAdjust.hpp b/xmrstak/backend/nvidia/autoAdjust.hpp
index d36a46a..053a0f1 100644
--- a/xmrstak/backend/nvidia/autoAdjust.hpp
+++ b/xmrstak/backend/nvidia/autoAdjust.hpp
@@ -24,58 +24,58 @@ class autoAdjust
{
public:
- autoAdjust()
- {
-
- }
-
- /** print the adjusted values if needed
- *
- * Routine exit the application and print the adjusted values if needed else
- * nothing is happened.
- */
- bool printConfig()
- {
+ autoAdjust()
+ {
+
+ }
+
+ /** print the adjusted values if needed
+ *
+ * Routine exit the application and print the adjusted values if needed else
+ * nothing is happened.
+ */
+ bool printConfig()
+ {
int deviceCount = 0;
- if(cuda_get_devicecount(&deviceCount) == 0)
- return false;
- // evaluate config parameter for if auto adjustment is needed
- // evaluate config parameter for if auto adjustment is needed
- for(int i = 0; i < deviceCount; i++)
- {
-
- nvid_ctx ctx;
-
- ctx.device_id = i;
- // -1 trigger auto adjustment
- ctx.device_blocks = -1;
- ctx.device_threads = -1;
-
- // set all evice option those marked as auto (-1) to a valid value
+ if(cuda_get_devicecount(&deviceCount) == 0)
+ return false;
+ // evaluate config parameter for if auto adjustment is needed
+ // evaluate config parameter for if auto adjustment is needed
+ for(int i = 0; i < deviceCount; i++)
+ {
+
+ nvid_ctx ctx;
+
+ ctx.device_id = i;
+ // -1 trigger auto adjustment
+ ctx.device_blocks = -1;
+ ctx.device_threads = -1;
+
+ // set all evice option those marked as auto (-1) to a valid value
#ifndef _WIN32
- ctx.device_bfactor = 0;
- ctx.device_bsleep = 0;
+ ctx.device_bfactor = 0;
+ ctx.device_bsleep = 0;
#else
- // windows pass, try to avoid that windows kills the miner if the gpu is blocked for 2 seconds
- ctx.device_bfactor = 6;
- ctx.device_bsleep = 25;
+ // windows pass, try to avoid that windows kills the miner if the gpu is blocked for 2 seconds
+ ctx.device_bfactor = 6;
+ ctx.device_bsleep = 25;
#endif
- if(cuda_get_deviceinfo(&ctx) == 0)
- nvidCtxVec.push_back(ctx);
- else
- printer::inst()->print_msg(L0, "WARNING: NVIDIA setup failed for GPU %d.\n", i);
+ if(cuda_get_deviceinfo(&ctx) == 0)
+ nvidCtxVec.push_back(ctx);
+ else
+ printer::inst()->print_msg(L0, "WARNING: NVIDIA setup failed for GPU %d.\n", i);
- }
+ }
- generateThreadConfig();
- return true;
+ generateThreadConfig();
+ return true;
- }
+ }
private:
-
- void generateThreadConfig()
- {
+
+ void generateThreadConfig()
+ {
// load the template of the backend config into a char variable
const char *tpl =
#include "./config.tpl"
@@ -86,8 +86,8 @@ private:
constexpr size_t byte2mib = 1024u * 1024u;
std::string conf;
- for(auto& ctx : nvidCtxVec)
- {
+ for(auto& ctx : nvidCtxVec)
+ {
if(ctx.device_threads * ctx.device_blocks > 0)
{
conf += std::string(" // gpu: ") + ctx.name + " architecture: " + std::to_string(ctx.device_arch[0] * 10 + ctx.device_arch[1]) + "\n";
@@ -99,14 +99,14 @@ private:
" \"affine_to_cpu\" : false,\n" +
" },\n";
}
- }
+ }
configTpl.replace("GPUCONFIG",conf);
configTpl.write(params::inst().configFileNVIDIA);
printer::inst()->print_msg(L0, "NVIDIA: GPU configuration stored in file '%s'", params::inst().configFileNVIDIA.c_str());
- }
+ }
- std::vector<nvid_ctx> nvidCtxVec;
+ std::vector<nvid_ctx> nvidCtxVec;
};
} // namespace nvidia
diff --git a/xmrstak/backend/nvidia/minethd.cpp b/xmrstak/backend/nvidia/minethd.cpp
index 9dbd83e..db18a0a 100644
--- a/xmrstak/backend/nvidia/minethd.cpp
+++ b/xmrstak/backend/nvidia/minethd.cpp
@@ -59,9 +59,9 @@ namespace nvidia
{
#ifdef WIN32
- HINSTANCE lib_handle;
+ HINSTANCE lib_handle;
#else
- void *lib_handle;
+ void *lib_handle;
#endif
minethd::minethd(miner_work& pWork, size_t iNo, const jconf::thd_cfg& cfg)
@@ -113,7 +113,7 @@ bool minethd::self_test()
//if(!bResult)
// printer::inst()->print_msg(L0,
- // "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
+ // "Cryptonight hash self-test failed. This might be caused by bad compiler optimizations.");
return bResult;
}
@@ -233,8 +233,8 @@ void minethd::work_main()
if (oWork.bStall)
{
/* We are stalled here because the executor didn't find a job for us yet,
- either because of network latency, or a socket problem. Since we are
- raison d'etre of this software it us sensible to just wait until we have something*/
+ either because of network latency, or a socket problem. Since we are
+ raison d'etre of this software it us sensible to just wait until we have something*/
while (globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
std::this_thread::sleep_for(std::chrono::milliseconds(100));
diff --git a/xmrstak/backend/plugin.hpp b/xmrstak/backend/plugin.hpp
index b08ab89..89cdf97 100644
--- a/xmrstak/backend/plugin.hpp
+++ b/xmrstak/backend/plugin.hpp
@@ -95,16 +95,16 @@ struct plugin
starterBackend_t fn_starterBackend;
#ifdef WIN32
- HINSTANCE libBackend;
+ HINSTANCE libBackend;
#else
- void *libBackend;
+ void *libBackend;
#endif
/* \todo add unload to destructor and change usage of plugin that libs keeped open until the miner endss
#ifdef WIN32
- FreeLibrary(libBackend);
+ FreeLibrary(libBackend);
#else
- dlclose(libBackend);
+ dlclose(libBackend);
#endif
* */
};
diff --git a/xmrstak/cli/cli-miner.cpp b/xmrstak/cli/cli-miner.cpp
index f0f3c3a..9ba495e 100644
--- a/xmrstak/cli/cli-miner.cpp
+++ b/xmrstak/cli/cli-miner.cpp
@@ -238,8 +238,8 @@ void do_guided_config(bool userSetPasswd)
std::cin.ignore(INT_MAX, '\n');
std::cout << "Invalid weight. Try 1, 10, 100, etc:" << std::endl;
}
- }
- else
+ }
+ else
pool_weight = 1;
std::string pool_table;
diff --git a/xmrstak/http/httpd.cpp b/xmrstak/http/httpd.cpp
index 8debfa7..81012fa 100644
--- a/xmrstak/http/httpd.cpp
+++ b/xmrstak/http/httpd.cpp
@@ -49,13 +49,13 @@ httpd::httpd()
}
int httpd::req_handler(void * cls,
- MHD_Connection* connection,
- const char* url,
- const char* method,
- const char* version,
- const char* upload_data,
- size_t* upload_data_size,
- void ** ptr)
+ MHD_Connection* connection,
+ const char* url,
+ const char* method,
+ const char* version,
+ const char* upload_data,
+ size_t* upload_data_size,
+ void ** ptr)
{
struct MHD_Response * rsp;
@@ -86,7 +86,7 @@ int httpd::req_handler(void * cls,
return ret;
}
}
-
+
*ptr = nullptr;
std::string str;
if(strcasecmp(url, "/style.css") == 0)
diff --git a/xmrstak/http/httpd.hpp b/xmrstak/http/httpd.hpp
index 3836968..fe534f0 100644
--- a/xmrstak/http/httpd.hpp
+++ b/xmrstak/http/httpd.hpp
@@ -21,13 +21,13 @@ private:
static httpd* oInst;
static int req_handler(void * cls,
- MHD_Connection* connection,
- const char* url,
- const char* method,
- const char* version,
- const char* upload_data,
- size_t* upload_data_size,
- void ** ptr);
+ MHD_Connection* connection,
+ const char* url,
+ const char* method,
+ const char* version,
+ const char* upload_data,
+ size_t* upload_data_size,
+ void ** ptr);
MHD_Daemon *d;
};
diff --git a/xmrstak/misc/configEditor.hpp b/xmrstak/misc/configEditor.hpp
index 3960384..4ab2030 100644
--- a/xmrstak/misc/configEditor.hpp
+++ b/xmrstak/misc/configEditor.hpp
@@ -35,7 +35,7 @@ struct configEditor
std::ifstream fstream(filename);
m_fileContent = std::string(
(std::istreambuf_iterator<char>(fstream)),
- std::istreambuf_iterator<char>()
+ std::istreambuf_iterator<char>()
);
return fstream.good();
}
diff --git a/xmrstak/net/jpsock.cpp b/xmrstak/net/jpsock.cpp
index 5769448..cc29375 100644
--- a/xmrstak/net/jpsock.cpp
+++ b/xmrstak/net/jpsock.cpp
@@ -93,8 +93,8 @@ struct jpsock::opq_json_val
};
jpsock::jpsock(size_t id, const char* sAddr, const char* sLogin, const char* sPassword, double pool_weight, bool dev_pool, bool tls, const char* tls_fp, bool nicehash) :
- net_addr(sAddr), usr_login(sLogin), usr_pass(sPassword), tls_fp(tls_fp), pool_id(id), pool_weight(pool_weight), pool(dev_pool), nicehash(nicehash),
- connect_time(0), connect_attempts(0), disconnect_time(0), quiet_close(false)
+ net_addr(sAddr), usr_login(sLogin), usr_pass(sPassword), tls_fp(tls_fp), pool_id(id), pool_weight(pool_weight), pool(dev_pool), nicehash(nicehash),
+ connect_time(0), connect_attempts(0), disconnect_time(0), quiet_close(false)
{
sock_init();
diff --git a/xmrstak/net/msgstruct.hpp b/xmrstak/net/msgstruct.hpp
index 9065fe3..a15f806 100644
--- a/xmrstak/net/msgstruct.hpp
+++ b/xmrstak/net/msgstruct.hpp
@@ -170,6 +170,6 @@ struct ex_event
//Get steady_clock timestamp - misc helper function
inline size_t get_timestamp()
{
- using namespace std::chrono;
- return time_point_cast<seconds>(steady_clock::now()).time_since_epoch().count();
+ using namespace std::chrono;
+ return time_point_cast<seconds>(steady_clock::now()).time_since_epoch().count();
};
OpenPOWER on IntegriCloud