From fce822e5f094d8bde9d0c3f3745d91129506ded0 Mon Sep 17 00:00:00 2001 From: psychocrypt <psychocryptHPC@gmail.com> Date: Fri, 21 Sep 2018 20:55:56 +0200 Subject: [PATCH] AMD: remove unused functions - remove unused host function (relict from old refactoring) - remove unused OpenCL full div function --- xmrstak/backend/amd/amd_gpu/gpu.cpp | 21 -------------- .../amd/amd_gpu/opencl/fast_int_math_v2.cl | 28 ------------------- 2 files changed, 49 deletions(-) diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp index 767e538..e2c2dfe 100644 --- a/xmrstak/backend/amd/amd_gpu/gpu.cpp +++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp @@ -611,27 +611,6 @@ const char* const attributeNames[] = { #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); -} - uint32_t getNumPlatforms() { cl_uint num_platforms = 0; diff --git a/xmrstak/backend/amd/amd_gpu/opencl/fast_int_math_v2.cl b/xmrstak/backend/amd/amd_gpu/opencl/fast_int_math_v2.cl index fe7cea1..607806b 100644 --- a/xmrstak/backend/amd/amd_gpu/opencl/fast_int_math_v2.cl +++ b/xmrstak/backend/amd/amd_gpu/opencl/fast_int_math_v2.cl @@ -81,34 +81,6 @@ inline uint2 fast_div_v2(const __local uint *RCP, ulong a, uint b) ); } -inline void fast_div_full_q(const __local uint *RCP, ulong a, uint b, ulong *q, uint *r) -{ - const uint rcp = get_reciprocal((const __local uchar *)RCP, b); - const ulong k = mul_hi(as_uint2(a).s0, rcp) + ((ulong)(as_uint2(a).s1) * rcp) + a; - - ((uint*)q)[0] = as_uint2(k).s1; - ((uint*)q)[1] = (k < a) ? 1 : 0; - - long tmp = a - (*q) * b; - - const bool overshoot = (tmp < 0); - const bool undershoot = (tmp >= b); - - if (overshoot) - { - --(*q); - tmp += b; - } - - if (undershoot) - { - ++(*q); - tmp -= b; - } - - *r = tmp; -} - inline uint fast_sqrt_v2(const ulong n1) { float x = as_float((as_uint2(n1).s1 >> 9) + ((64U + 127U) << 23)); -- GitLab