Skip to content

Commit c2e46dd

Browse files
committed
Add debug message listing CPU extensions used in Manager
1 parent ee3cfb9 commit c2e46dd

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

include/reportsystem.h

+2
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,8 @@ enum InfoCode {
305305

306306
RemovingDuplicateSequences = 4,
307307

308+
UsingPlatform = 5,
309+
308310

309311
__MAXINFO
310312
};

source/Statistics/Manager.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include "Statistics/Identity.h"
3737
#include "Statistics/Manager.h"
3838
#include "Statistics/Overlap.h"
39+
#include "reportsystem.h"
3940
#include "InternalBenchmarker.h"
4041

4142
#if defined(HAVE_AVX2)
@@ -414,6 +415,19 @@ namespace statistics {
414415
platform = ComputePlatform::NEON;
415416
#endif
416417
#endif
418+
419+
switch(platform) {
420+
case ComputePlatform::AVX2:
421+
debug.report(InfoCode::UsingPlatform, new std::string[1]{"AVX2"});
422+
break;
423+
case ComputePlatform::SSE2:
424+
debug.report(InfoCode::UsingPlatform, new std::string[1]{"SSE2"});
425+
break;
426+
case ComputePlatform::NEON:
427+
debug.report(InfoCode::UsingPlatform, new std::string[1]{"NEON"});
428+
break;
429+
}
430+
417431
}
418432

419433
Manager::Manager(Alignment *parent, Manager *mold) {

source/reportMessages/infoMessages.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,8 @@ const std::map<InfoCode, const char *> reporting::reportManager::InfoMessages =
4444
},
4545

4646
{InfoCode::RemovingDuplicateSequences,
47-
"Removing sequence \"[tag]\" as it is a duplicate of \"[tag]\"."}
47+
"Removing sequence \"[tag]\" as it is a duplicate of \"[tag]\"."},
48+
49+
{InfoCode::UsingPlatform,
50+
"Using \"[tag]\" CPU extensions to compute statistics."}
4851
};

0 commit comments

Comments
 (0)