1 Star 0 Fork 1

Linteeh/BitCrack

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cudabridge.cu 777 Bytes
一键复制 编辑 原始数据 按行查看 历史
brichard19 提交于 2018-09-30 07:48 +08:00 . Rename 'KeyFinder' to 'KeySearch'
#include "cudabridge.h"
__global__ void keyFinderKernel(int points, int compression);
__global__ void keyFinderKernelWithDouble(int points, int compression);
void callKeyFinderKernel(int blocks, int threads, int points, bool useDouble, int compression)
{
if(useDouble) {
keyFinderKernelWithDouble <<<blocks, threads >>>(points, compression);
} else {
keyFinderKernel <<<blocks, threads>>> (points, compression);
}
waitForKernel();
}
void waitForKernel()
{
// Check for kernel launch error
cudaError_t err = cudaGetLastError();
if(err != cudaSuccess) {
throw cuda::CudaException(err);
}
// Wait for kernel to complete
err = cudaDeviceSynchronize();
fflush(stdout);
if(err != cudaSuccess) {
throw cuda::CudaException(err);
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Linteeh/BitCrack.git
git@gitee.com:Linteeh/BitCrack.git
Linteeh
BitCrack
BitCrack
master

搜索帮助