{
for (int i = 0; i < STEPS_CNT; i++)
{
- const u32 kernel_accel_try = 1 << i;
+ const u32 kernel_accel_try = 1u << i;
if (kernel_accel_try < kernel_accel_min) continue;
if (kernel_accel_try > kernel_accel_max) break;
if (bitmap_max < bitmap_min) bitmap_max = bitmap_min;
- uint *bitmap_s1_a = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s1_b = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s1_c = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s1_d = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s2_a = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s2_b = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s2_c = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
- uint *bitmap_s2_d = (uint *) mymalloc ((1 << bitmap_max) * sizeof (uint));
+ uint *bitmap_s1_a = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s1_b = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s1_c = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s1_d = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s2_a = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s2_b = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s2_c = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
+ uint *bitmap_s2_d = (uint *) mymalloc ((1u << bitmap_max) * sizeof (uint));
uint bitmap_bits;
uint bitmap_nums;
{
if (data.quiet == 0) log_info_nn ("Generating bitmap tables with %u bits...", bitmap_bits);
- bitmap_nums = 1 << bitmap_bits;
+ bitmap_nums = 1u << bitmap_bits;
bitmap_mask = bitmap_nums - 1;
break;
}
- bitmap_nums = 1 << bitmap_bits;
+ bitmap_nums = 1u << bitmap_bits;
bitmap_mask = bitmap_nums - 1;
for (uint platform_id = 0; platform_id < platforms_cnt; platform_id++)
{
- if ((opencl_platforms_filter & (1 << platform_id)) == 0) continue;
+ if ((opencl_platforms_filter & (1u << platform_id)) == 0) continue;
cl_platform_id platform = platforms[platform_id];
platform_vendor_id = VENDOR_ID_GENERIC;
}
- uint platform_skipped = ((opencl_platforms_filter & (1 << platform_id)) == 0);
+ uint platform_skipped = ((opencl_platforms_filter & (1u << platform_id)) == 0);
CL_err = hc_clGetDeviceIDs (data.ocl, platform, CL_DEVICE_TYPE_ALL, DEVICES_MAX, platform_devices, &platform_devices_cnt);
// skipped
- device_param->skipped |= ((devices_filter & (1 << device_id)) == 0);
+ device_param->skipped |= ((devices_filter & (1u << device_id)) == 0);
device_param->skipped |= ((device_types_filter & (device_type)) == 0);
// driver_version
{
size_scrypt = (128 * scrypt_r) * scrypt_N;
- size_scrypt /= 1 << tmto;
+ size_scrypt /= 1u << tmto;
size_scrypt *= device_param->device_processors * device_param->kernel_threads * device_param->kernel_accel_max;