Initialize CUDA devices and some first attribute queries
This commit is contained in:
@@ -39,6 +39,12 @@ int hc_nvrtcGetProgramLog (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog,
|
||||
int hc_nvrtcGetPTXSize (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, size_t *ptxSizeRet);
|
||||
int hc_nvrtcGetPTX (hashcat_ctx_t *hashcat_ctx, nvrtcProgram prog, char *ptx);
|
||||
|
||||
int hc_cuInit (hashcat_ctx_t *hashcat_ctx, unsigned int Flags);
|
||||
int hc_cuDeviceGetAttribute (hashcat_ctx_t *hashcat_ctx, int *pi, CUdevice_attribute attrib, CUdevice dev);
|
||||
int hc_cuDeviceGetCount (hashcat_ctx_t *hashcat_ctx, int *count);
|
||||
int hc_cuDeviceGet (hashcat_ctx_t *hashcat_ctx, CUdevice *device, int ordinal);
|
||||
int hc_cuDeviceGetName (hashcat_ctx_t *hashcat_ctx, char *name, int len, CUdevice dev);
|
||||
|
||||
int hc_clBuildProgram (hashcat_ctx_t *hashcat_ctx, cl_program program, cl_uint num_devices, const cl_device_id *device_list, const char *options, void (CL_CALLBACK *pfn_notify) (cl_program program, void *user_data), void *user_data);
|
||||
int hc_clCreateBuffer (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_mem_flags flags, size_t size, void *host_ptr, cl_mem *mem);
|
||||
int hc_clCreateCommandQueue (hashcat_ctx_t *hashcat_ctx, cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_command_queue *command_queue);
|
||||
|
||||
@@ -1340,6 +1340,18 @@ typedef struct backend_ctx
|
||||
void *cuda;
|
||||
void *nvrtc;
|
||||
|
||||
int *backend_device_from_cuda; // from cuda device index to backend device index
|
||||
int *backend_device_to_cuda; // from backend device index to cuda device index
|
||||
int *backend_device_from_opencl; // from opencl device index to backend device index
|
||||
int *backend_device_to_opencl; // from backend device index to opencl device index
|
||||
|
||||
int backend_devices_cnt;
|
||||
int backend_devices_active;
|
||||
int cuda_devices_cnt;
|
||||
int cuda_devices_active;
|
||||
int opencl_devices_cnt;
|
||||
int opencl_devices_active;
|
||||
|
||||
cl_uint platforms_cnt;
|
||||
cl_platform_id *platforms;
|
||||
char **platforms_vendor;
|
||||
|
||||
+1040
-833
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user