diff --git a/src/modules/module_08900.c b/src/modules/module_08900.c index 43a528158..06be00b6e 100644 --- a/src/modules/module_08900.c +++ b/src/modules/module_08900.c @@ -111,7 +111,7 @@ u64 module_extra_buffer_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE const u32 scrypt_N = (hashes->salts_buf[0].scrypt_N) ? hashes->salts_buf[0].scrypt_N : 1024; const u32 scrypt_r = (hashes->salts_buf[0].scrypt_r) ? hashes->salts_buf[0].scrypt_r : 1; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); u32 tmto_start = 1; u32 tmto_stop = 6; @@ -224,7 +224,7 @@ u64 module_extra_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UN } } - const u64 tmp_size = (128 * scrypt_r * scrypt_p); + const u64 tmp_size = (u64)(128 * scrypt_r * scrypt_p); return tmp_size; } @@ -242,13 +242,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY const u64 extra_buffer_size = device_param->extra_buffer_size; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); - const u64 size_scrypt = (128 * scrypt_r) * scrypt_N; + const u64 size_scrypt = (u64)(128 * scrypt_r * scrypt_N); const u64 scrypt_tmto_final = (kernel_power_max * size_scrypt) / extra_buffer_size; - const u64 tmp_size = (128 * scrypt_r) * scrypt_p; + const u64 tmp_size = (u64)(128 * scrypt_r * scrypt_p); char *jit_build_options = NULL; diff --git a/src/modules/module_09300.c b/src/modules/module_09300.c index a9ea1573c..70cbe6913 100644 --- a/src/modules/module_09300.c +++ b/src/modules/module_09300.c @@ -112,7 +112,7 @@ u64 module_extra_buffer_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE const u32 scrypt_r = 1; //const u32 scrypt_p = 1; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); u32 tmto_start = 1; u32 tmto_stop = 6; @@ -231,13 +231,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY const u64 extra_buffer_size = device_param->extra_buffer_size; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); - const u64 size_scrypt = (128 * scrypt_r) * scrypt_N; + const u64 size_scrypt = (u64)(128 * scrypt_r * scrypt_N); const u64 scrypt_tmto_final = (kernel_power_max * size_scrypt) / extra_buffer_size; - const u64 tmp_size = (128 * scrypt_r) * scrypt_p; + const u64 tmp_size = (u64)(128 * scrypt_r * scrypt_p); char *jit_build_options = NULL; diff --git a/src/modules/module_15700.c b/src/modules/module_15700.c index 9f2700d65..2b814cc05 100644 --- a/src/modules/module_15700.c +++ b/src/modules/module_15700.c @@ -127,7 +127,7 @@ u64 module_extra_buffer_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE const u32 scrypt_r = (hashes->salts_buf[0].scrypt_r) ? hashes->salts_buf[0].scrypt_r : 8; //const u32 scrypt_p = (hashes->salts_buf[0].scrypt_p) ? hashes->salts_buf[0].scrypt_p : 1; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); u32 tmto_start = 1; u32 tmto_stop = 6; @@ -240,7 +240,7 @@ u64 module_extra_tmp_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UN } } - const u64 tmp_size = (128 * scrypt_r * scrypt_p); + const u64 tmp_size = (u64)(128 * scrypt_r * scrypt_p); return tmp_size; } @@ -269,13 +269,13 @@ char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAY const u64 extra_buffer_size = device_param->extra_buffer_size; - const u64 kernel_power_max = device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max; + const u64 kernel_power_max = (u64)(device_param->device_processors * hashconfig->kernel_threads_max * hashconfig->kernel_accel_max); - const u64 size_scrypt = (128 * scrypt_r) * scrypt_N; + const u64 size_scrypt = (u64)(128 * scrypt_r * scrypt_N); const u64 scrypt_tmto_final = (kernel_power_max * size_scrypt) / extra_buffer_size; - const u64 tmp_size = (128 * scrypt_r) * scrypt_p; + const u64 tmp_size = (u64)(128 * scrypt_r * scrypt_p); char *jit_build_options = NULL;