|
|
@@ -326,15 +326,14 @@ const char *_set_list(char * const arg, const char * const emsg, bool (*set_func
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-#define _SET_INT_LIST(PNAME, VCHECK, FIELD) \
|
|
|
+#define _SET_INT_LIST2(PNAME, VCHECK, FIELD) \
|
|
|
static \
|
|
|
bool _set_ ## PNAME (struct cgpu_info * const cgpu, const char * const _val) \
|
|
|
{ \
|
|
|
const int v = atoi(_val); \
|
|
|
if (!(VCHECK)) \
|
|
|
return false; \
|
|
|
- struct opencl_device_data * const data = cgpu->device_data; \
|
|
|
- data->FIELD = v; \
|
|
|
+ FIELD = v; \
|
|
|
return true; \
|
|
|
} \
|
|
|
const char *set_ ## PNAME(char *arg) \
|
|
|
@@ -343,6 +342,8 @@ const char *set_ ## PNAME(char *arg) \
|
|
|
} \
|
|
|
// END OF _SET_INT_LIST
|
|
|
|
|
|
+#define _SET_INT_LIST(PNAME, VCHECK, FIELD) \
|
|
|
+ _SET_INT_LIST2(PNAME, VCHECK, ((struct opencl_device_data *)cgpu->device_data)->FIELD)
|
|
|
|
|
|
#ifdef HAVE_OPENCL
|
|
|
_SET_INT_LIST(vector , (v == 1 || v == 2 || v == 4), vwidth )
|