|
|
|
@ -58,6 +58,41 @@ static const char *SIGNATURE_OLDOFFICE = "$oldoffice$";
|
|
|
|
|
static const char *SIGNATURE_OLDOFFICE0 = "$oldoffice$0";
|
|
|
|
|
static const char *SIGNATURE_OLDOFFICE1 = "$oldoffice$1";
|
|
|
|
|
|
|
|
|
|
char *module_jit_build_options (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra, MAYBE_UNUSED const hashes_t *hashes, MAYBE_UNUSED const hc_device_param_t *device_param)
|
|
|
|
|
{
|
|
|
|
|
char *jit_build_options = NULL;
|
|
|
|
|
|
|
|
|
|
u32 native_threads = 0;
|
|
|
|
|
|
|
|
|
|
if (device_param->opencl_device_type & CL_DEVICE_TYPE_CPU)
|
|
|
|
|
{
|
|
|
|
|
native_threads = 1;
|
|
|
|
|
}
|
|
|
|
|
else if (device_param->opencl_device_type & CL_DEVICE_TYPE_GPU)
|
|
|
|
|
{
|
|
|
|
|
if (device_param->opencl_device_vendor_id == VENDOR_ID_INTEL_SDK)
|
|
|
|
|
{
|
|
|
|
|
native_threads = 8;
|
|
|
|
|
}
|
|
|
|
|
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD)
|
|
|
|
|
{
|
|
|
|
|
native_threads = 64;
|
|
|
|
|
}
|
|
|
|
|
else if (device_param->opencl_device_vendor_id == VENDOR_ID_AMD_USE_HIP)
|
|
|
|
|
{
|
|
|
|
|
native_threads = 64;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
native_threads = 32;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
hc_asprintf (&jit_build_options, "-D FIXED_LOCAL_SIZE=%u -D _unroll", native_threads);
|
|
|
|
|
|
|
|
|
|
return jit_build_options;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
u64 module_esalt_size (MAYBE_UNUSED const hashconfig_t *hashconfig, MAYBE_UNUSED const user_options_t *user_options, MAYBE_UNUSED const user_options_extra_t *user_options_extra)
|
|
|
|
|
{
|
|
|
|
|
const u64 esalt_size = (const u64) sizeof (oldoffice01_t);
|
|
|
|
@ -273,7 +308,7 @@ void module_init (module_ctx_t *module_ctx)
|
|
|
|
|
module_ctx->module_hook23 = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_hook_salt_size = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_hook_size = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_jit_build_options = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_jit_build_options = module_jit_build_options;
|
|
|
|
|
module_ctx->module_jit_cache_disable = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_kernel_accel_max = MODULE_DEFAULT;
|
|
|
|
|
module_ctx->module_kernel_accel_min = MODULE_DEFAULT;
|
|
|
|
|