Skip to content

Commit

Permalink
Add detect function to FeaturePerfUtilities (#5)
Browse files Browse the repository at this point in the history
- Added detect function to FeaturePerfUtility
---------

Co-authored-by: Lukas <[email protected]>
Co-authored-by: Florian Sattler <[email protected]>
  • Loading branch information
3 people authored Nov 19, 2023
1 parent b72ba04 commit c6081c2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/fp_util/feature_detect.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef FEATURE_DETECT_H
#define FEATURE_DETECT_H

namespace fp_util {

__attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
long foo = 0;
asm volatile("" : "+g"(foo) : :);
foo++;
}
} // namespace fp_util

#endif // FEATURE_DETECT_H

0 comments on commit c6081c2

Please sign in to comment.