static void crypt_all(int count) { /// Copy data to gpu HANDLE_CLERROR(clEnqueueWriteBuffer(queue[gpu_id], mem_in, CL_FALSE, 0, insize, inbuffer, 0, NULL, NULL), "Copy data to gpu"); HANDLE_CLERROR(clEnqueueWriteBuffer(queue[gpu_id], mem_setting, CL_FALSE, 0, settingsize, ¤tsalt, 0, NULL, NULL), "Copy setting to gpu"); /// Run kernel HANDLE_CLERROR(clEnqueueNDRangeKernel(queue[gpu_id], crypt_kernel, 1, NULL, &global_work_size, &local_work_size, 0, NULL, NULL), "Run kernel"); HANDLE_CLERROR(clFinish(queue[gpu_id]), "clFinish"); /// Read the result back HANDLE_CLERROR(clEnqueueReadBuffer(queue[gpu_id], mem_out, CL_FALSE, 0, outsize, outbuffer, 0, NULL, NULL), "Copy result back"); /// Await completion of all the above HANDLE_CLERROR(clFinish(queue[gpu_id]), "clFinish"); ///Make last computations on CPU wpapsk_postprocess(KEYS_PER_CRYPT); }
static int crypt_all(int *pcount, struct db_salt *salt) { const int count = *pcount; if (new_keys || strcmp(last_ssid, hccap.essid)) { #ifndef SIMD_COEF_32 wpapsk_cpu(count, inbuffer, outbuffer, ¤tsalt); #else wpapsk_sse(count, inbuffer, outbuffer, ¤tsalt); #endif new_keys = 0; strcpy(last_ssid, hccap.essid); } wpapsk_postprocess(count); return count; }
static void crypt_all(int count) { wpapsk_gpu(inbuffer, outbuffer, ¤tsalt); wpapsk_postprocess(KEYS_PER_CRYPT); }
static void crypt_all(int count) { wpapsk_cpu(count, inbuffer, outbuffer, ¤tsalt); wpapsk_postprocess(count); }