Create opencl_ctx_devices_show() as an example for how to access opencl devices from library and as replacement for inlined code for -I

This commit is contained in:
jsteube
2016-10-25 15:43:09 +02:00
parent c4ba7907ca
commit 824654e2fb
4 changed files with 152 additions and 50 deletions
+1
View File
@@ -69,6 +69,7 @@ int opencl_ctx_init (hashcat_ctx_t *hashcat_ctx);
void opencl_ctx_destroy (hashcat_ctx_t *hashcat_ctx);
int opencl_ctx_devices_init (hashcat_ctx_t *hashcat_ctx, const int comptime);
void opencl_ctx_devices_show (hashcat_ctx_t *hashcat_ctx);
void opencl_ctx_devices_destroy (hashcat_ctx_t *hashcat_ctx);
void opencl_ctx_devices_update_power (hashcat_ctx_t *hashcat_ctx);
void opencl_ctx_devices_kernel_loops (hashcat_ctx_t *hashcat_ctx);
+4
View File
@@ -748,6 +748,7 @@ typedef struct hc_device_param
char *device_name_chksum;
char *device_version;
char *driver_version;
char *device_opencl_version;
bool opencl_v12;
@@ -846,6 +847,9 @@ typedef struct opencl_ctx
cl_uint platforms_cnt;
cl_platform_id *platforms;
char **platforms_vendor;
char **platforms_name;
char **platforms_version;
cl_uint platform_devices_cnt;
cl_device_id *platform_devices;