File tree Expand file tree Collapse file tree 4 files changed +184
-70
lines changed Expand file tree Collapse file tree 4 files changed +184
-70
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,43 @@ BanTableModel* ClientModel::getBanTableModel()
245
245
return banTableModel;
246
246
}
247
247
248
+ QString ClientModel::CPUAVXMode () const
249
+ {
250
+ #if defined(__AVX512F__)
251
+ return QString (" AVX512" );
252
+ #elif defined(__AVX2__)
253
+ return QString (" AVX2" );
254
+ #elif !defined(__AVX2__) && !defined(__AVX512F__)
255
+ return QString (" Normal" );
256
+ #else
257
+ return QString (" Normal" );
258
+ #endif
259
+ }
260
+
261
+ QString ClientModel::GPUMode () const
262
+ {
263
+ #if defined(HAVE_CUDA)
264
+ return QString (" CUDA" );
265
+ #elif !defined(HAVE_CUDA) && defined(ENABLE_GPU)
266
+ return QString (" OpenCL" );
267
+ #elif !defined(HAVE_CUDA) && !defined(ENABLE_GPU)
268
+ return QString (" N/A" );
269
+ #else
270
+ return QString (" N/A" );
271
+ #endif
272
+ }
273
+
274
+ QString ClientModel::GPUState () const
275
+ {
276
+ #if defined(ENABLE_GPU)
277
+ return QString (" Enabled" );
278
+ #elif !defined(ENABLE_GPU)
279
+ return QString (" Disabled" );
280
+ #else
281
+ return QString (" Disabled" );
282
+ #endif
283
+ }
284
+
248
285
QString ClientModel::formatFullVersion () const
249
286
{
250
287
return QString::fromStdString (FormatFullVersion ());
Original file line number Diff line number Diff line change @@ -77,6 +77,11 @@ class ClientModel : public QObject
77
77
// ! Return warnings to be displayed in status bar
78
78
QString getStatusBarWarnings () const ;
79
79
80
+ // ! Return CPU and GPU states
81
+ QString CPUAVXMode () const ;
82
+ QString GPUMode () const ;
83
+ QString GPUState () const ;
84
+
80
85
QString formatFullVersion () const ;
81
86
QString formatSubVersion () const ;
82
87
bool isReleaseVersion () const ;
You can’t perform that action at this time.
0 commit comments