Skip to content

Commit

Permalink
Add a target to the Makefile to print cpu flags
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Bevenius <[email protected]>
  • Loading branch information
danbev committed May 14, 2024
1 parent 0f56a07 commit 5c625d1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions fundamentals/simd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,15 @@ $(TARGETS): % : $(SRCDIR)/%.cpp | bindir
bindir: bin
bin:
@mkdir -p $(BINDIR)

# Fused Multiply and Add
.PHONY: lscpu-fma
lscpu-fma: FLAG = fma
lscpu-fma: lscpu

.PHONY: lscpu-avx
lscpu-avx: FLAG = avx
lscpu-avx: lscpu

lscpu:
@lscpu | grep Flags | tr ' ' '\n' | grep $(FLAG)

0 comments on commit 5c625d1

Please sign in to comment.