CSFLOC rewrite

Signed-off-by: gothictomato <gothictomato@pm.me>
This commit is contained in:
gothictomato
2022-09-04 10:52:28 -04:00
parent e2b633c802
commit 53a580d0ec
9 changed files with 761 additions and 228 deletions

View File

@@ -152,6 +152,7 @@ i32 gpusolve2(gpusolver* gs, cnf* c) {
exit(1);
}
gs->gpuCUs = 1024;
mpz_t gmpmax;
mpz_init(gmpmax);
mpz_ui_pow_ui(gmpmax, 2, c->cnts[0]);
@@ -161,6 +162,8 @@ i32 gpusolve2(gpusolver* gs, cnf* c) {
// printf("\n\n");
mpz_clear(gmpmax);
solution[0] = 0;
cl_int res = 2;
cl_mem gpuheader = clCreateBuffer(gs->ctx, CL_MEM_READ_ONLY, 2 * sizeof(cl_uint), NULL, &res);
@@ -233,7 +236,7 @@ i32 gpusolve2(gpusolver* gs, cnf* c) {
res = clSetKernelArg(gs->kernel, 5, sizeof(cl_mem), (void*) &gpuscratchpad);
size_t deploySize[2] = { gs->gpuCUs, 1 };
size_t deploySize[2] = { gs->gpuCUs, 64 };
res = clEnqueueNDRangeKernel(gs->commqueue, gs->kernel, 1, NULL, &(gs->gpuCUs), &(gs->gpuCUs), 0, NULL, NULL);
if (res != CL_SUCCESS) {
printf("Failed to queue kernel for execution\n");