Skip to content

Commit

Permalink
- Added detect function to FeaturePerfUtility
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukas committed Nov 18, 2023
1 parent b72ba04 commit 8e1b2e3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions include/fp_util/feature_detect.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* Author: Lukas
* Created: 18/11/2023.
**/

#ifndef FEATURE_DETECT_H
#define FEATURE_DETECT_H

namespace fp_util {

__attribute__((feature_variable("__VARA__DETECT__"))) void detect() {
long counter = 0;
asm volatile("" : "+g"(counter) : :);
counter++;
}
}

#endif //FEATURE_DETECT_H

0 comments on commit 8e1b2e3

Please sign in to comment.