1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

No need to copy empty compression buffers

This commit is contained in:
Jens Steube 2018-02-16 16:20:35 +01:00
parent c7ae5fb7f0
commit fe321105fe

View File

@ -2047,9 +2047,12 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const
const u32 off = pw_idx->off;
if (off)
{
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, 0, off * sizeof (u32), device_param->pws_comp, 0, NULL, NULL);
if (CL_rc == -1) return -1;
}
CL_rc = run_kernel_decompress (hashcat_ctx, device_param, pws_cnt);
@ -2095,9 +2098,12 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const
const u32 off = pw_idx->off;
if (off)
{
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, 0, off * sizeof (u32), device_param->pws_comp, 0, NULL, NULL);
if (CL_rc == -1) return -1;
}
CL_rc = run_kernel_decompress (hashcat_ctx, device_param, pws_cnt);
@ -2117,9 +2123,12 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const
const u32 off = pw_idx->off;
if (off)
{
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, 0, off * sizeof (u32), device_param->pws_comp, 0, NULL, NULL);
if (CL_rc == -1) return -1;
}
CL_rc = run_kernel_decompress (hashcat_ctx, device_param, pws_cnt);
@ -2137,9 +2146,12 @@ int run_copy (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, const
const u32 off = pw_idx->off;
if (off)
{
CL_rc = hc_clEnqueueWriteBuffer (hashcat_ctx, device_param->command_queue, device_param->d_pws_comp_buf, CL_TRUE, 0, off * sizeof (u32), device_param->pws_comp, 0, NULL, NULL);
if (CL_rc == -1) return -1;
}
CL_rc = run_kernel_decompress (hashcat_ctx, device_param, pws_cnt);