#define MD4_Go(x,y,z) (bitselect ((x), (y), ((x) ^ (z))))
#endif
+#ifdef IS_UNKNOWN
+#define MD4_F(x,y,z) (((x) & (y)) | ((~(x)) & (z)))
+#define MD4_G(x,y,z) (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+#define MD4_H(x,y,z) ((x) ^ (y) ^ (z))
+#define MD4_H1(x,y,z) ((tmp2 = (x) ^ (y)) ^ (z))
+#define MD4_H2(x,y,z) ((x) ^ tmp2)
+#define MD4_Fo(x,y,z) (MD4_F((x), (y), (z)))
+#define MD4_Go(x,y,z) (MD4_G((x), (y), (z)))
+#endif
+
#define MD4_STEP(f,a,b,c,d,x,K,s) \
{ \
a += K; \
#define MD5_Go(x,y,z) (bitselect ((y), (x), (z)))
#endif
+#ifdef IS_UNKNOWN
+#define MD5_F(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
+#define MD5_G(x,y,z) ((y) ^ ((z) & ((x) ^ (y))))
+#define MD5_H(x,y,z) ((x) ^ (y) ^ (z))
+#define MD5_H1(x,y,z) ((tmp2 = (x) ^ (y)) ^ (z))
+#define MD5_H2(x,y,z) ((x) ^ tmp2)
+#define MD5_I(x,y,z) ((y) ^ ((x) | ~(z)))
+#define MD5_Fo(x,y,z) (MD5_F((x), (y), (z)))
+#define MD5_Go(x,y,z) (MD5_G((x), (y), (z)))
+#endif
+
#define MD5_STEP(f,a,b,c,d,x,K,s) \
{ \
a += K; \
#define SHA1_F2o(x,y,z) (bitselect ((x), (y), ((x) ^ (z))))
#endif
+#ifdef IS_UNKNOWN
+#define SHA1_F0(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
+#define SHA1_F1(x,y,z) ((x) ^ (y) ^ (z))
+#define SHA1_F2(x,y,z) (((x) & (y)) | ((z) & ((x) ^ (y))))
+#define SHA1_F0o(x,y,z) (SHA1_F0 ((x), (y), (z)))
+#define SHA1_F2o(x,y,z) (SHA1_F2 ((x), (y), (z)))
+#endif
+
#define SHA1_STEP(f,a,b,c,d,e,x) \
{ \
e += K; \
#define SHA256_F1o(x,y,z) (bitselect ((z), (y), (x)))
#endif
+#ifdef IS_UNKNOWN
+#define SHA256_F0(x,y,z) (((x) & (y)) | ((z) & ((x) ^ (y))))
+#define SHA256_F1(x,y,z) ((z) ^ ((x) & ((y) ^ (z))))
+#define SHA256_F0o(x,y,z) (SHA256_F0 ((x), (y), (z)))
+#define SHA256_F1o(x,y,z) (SHA256_F1 ((x), (y), (z)))
+#endif
+
#define SHA256_STEP(F0,F1,a,b,c,d,e,f,g,h,x,K) \
{ \
h += K; \
#define SHA384_F1o(x,y,z) (bitselect ((x), (y), ((x) ^ (z))))
#endif
+#ifdef IS_UNKNOWN
+#define SHA384_F0o(x,y,z) (SHA384_F0 ((x), (y), (z)))
+#define SHA384_F1o(x,y,z) (SHA384_F1 ((x), (y), (z)))
+#endif
+
#define SHA384_STEP(F0,F1,a,b,c,d,e,f,g,h,x,K) \
{ \
u64 temp0; \
#define SHA512_F1o(x,y,z) (bitselect ((x), (y), ((x) ^ (z))))
#endif
+#ifdef IS_UNKNOWN
+#define SHA512_F0o(x,y,z) (SHA512_F0 ((x), (y), (z)))
+#define SHA512_F1o(x,y,z) (SHA512_F1 ((x), (y), (z)))
+#endif
+
#define SHA512_STEP(F0,F1,a,b,c,d,e,f,g,h,x,K) \
{ \
u64 temp0; \
#define RIPEMD160_Io(x,y,z) (bitselect ((y), (x), (z)))
#endif
+#ifdef IS_UNKNOWN
+#define RIPEMD160_F(x,y,z) ((x) ^ (y) ^ (z))
+#define RIPEMD160_G(x,y,z) ((z) ^ ((x) & ((y) ^ (z)))) /* x ? y : z */
+#define RIPEMD160_H(x,y,z) (((x) | ~(y)) ^ (z))
+#define RIPEMD160_I(x,y,z) ((y) ^ ((z) & ((x) ^ (y)))) /* z ? x : y */
+#define RIPEMD160_J(x,y,z) ((x) ^ ((y) | ~(z)))
+#define RIPEMD160_Go(x,y,z) (RIPEMD160_G ((x), (y), (z)))
+#define RIPEMD160_Io(x,y,z) (RIPEMD160_I ((x), (y), (z)))
+#endif
+
#define RIPEMD160_STEP(f,a,b,c,d,e,x,K,s) \
{ \
a += K; \
if (gpu_platform == NULL)
{
log_error ("ERROR: Too many OpenCL compatible platforms found");
- log_error (" Please select a single platform using the --gpu-platform option");
- log_error ("");
- log_error ("Available OpenCL platforms:");
+
+ log_info ("Please select a single platform using the --gpu-platform option");
+ log_info ("");
+ log_info ("Available OpenCL platforms:");
+ log_info ("");
for (uint i = 0; i < CL_platforms_cnt; i++)
{
hc_clGetPlatformInfo (CL_platforms[i], CL_PLATFORM_VENDOR, sizeof (CL_platform_vendor), CL_platform_vendor, NULL);
- printf ("* %d = %s\n", i + 1, CL_platform_vendor);
+ log_info ("* %d = %s", i + 1, CL_platform_vendor);
}
+ log_info ("");
+
return (-1);
}
else
hc_clGetPlatformInfo (CL_platform, CL_PLATFORM_VENDOR, sizeof (CL_platform_vendor), CL_platform_vendor, NULL);
+ cl_device_type device_type;
+
uint vendor_id;
if (strcmp (CL_platform_vendor, CL_VENDOR_AMD) == 0)
{
vendor_id = VENDOR_ID_AMD;
+
+ device_type = CL_DEVICE_TYPE_GPU;
}
else if (strcmp (CL_platform_vendor, CL_VENDOR_NV) == 0)
{
vendor_id = VENDOR_ID_NV;
+ device_type = CL_DEVICE_TYPE_GPU;
+
// make sure that we do not directly control the fan for NVidia
gpu_temp_retain = 0;
+
data.gpu_temp_retain = gpu_temp_retain;
}
+ else if (strcmp (CL_platform_vendor, CL_VENDOR_POCL) == 0)
+ {
+ vendor_id = VENDOR_ID_POCL;
+
+ device_type = CL_DEVICE_TYPE_CPU;
+
+ gpu_temp_disable = 1;
+ }
else
{
vendor_id = VENDOR_ID_UNKNOWN;
+
+ device_type = CL_DEVICE_TYPE_DEFAULT;
}
if (vendor_id == VENDOR_ID_UNKNOWN)
uint devices_all_cnt = 0;
- hc_clGetDeviceIDs (CL_platform, CL_DEVICE_TYPE_GPU, DEVICES_MAX, devices_all, (uint *) &devices_all_cnt);
+ hc_clGetDeviceIDs (CL_platform, device_type, DEVICES_MAX, devices_all, (uint *) &devices_all_cnt);
int hm_adapters_all = devices_all_cnt;