Working to make OpenCL recognize the limitations of the device its on, as well as reusing the OpenCL kernel/context for multiple runs.
Signed-off-by: gothictomato <gothictomato@pm.me>
This commit is contained in:
23
gpusolver.h
23
gpusolver.h
@@ -1,4 +1,27 @@
|
||||
#pragma once
|
||||
#include "ncnf.h"
|
||||
#include <CL/cl.h>
|
||||
|
||||
typedef struct {
|
||||
cl_platform_id platformid;
|
||||
cl_device_id deviceid;
|
||||
cl_uint numdevices;
|
||||
cl_uint numplatforms;
|
||||
char* source_str;
|
||||
size_t source_size;
|
||||
cl_context ctx;
|
||||
cl_command_queue commqueue;
|
||||
cl_program program;
|
||||
cl_kernel kernel;
|
||||
u64 gpuMemoryMax;
|
||||
u64 gpuLocalMax;
|
||||
u64 gpuAllocMax;
|
||||
u64 gpuCUs;
|
||||
} gpusolver;
|
||||
|
||||
gpusolver* initSolver();
|
||||
i32 gpusolve2(gpusolver* gs, cnf* c);
|
||||
void freeSolver(gpusolver* gs);
|
||||
|
||||
|
||||
i32 gpusolve(cnf* c);
|
||||
Reference in New Issue
Block a user