Skip to content

Commit

Permalink
math_neon: workaround so we can build and link without it.
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliomoro committed Jun 1, 2024
1 parent 7d178a1 commit 6f42417
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions libraries/math_neon/lib.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ name=math_neon
description=A convenience wrapper for math_neon, a fast, optimized, approximated, math library.
examples=Fundamentals/sinetone-optimized-bank, Fundamentals/scope-advanced, Salt/pink-trombone
license=MIT
LDLIBS=-lmathneon

LDLIBS=$$(bash -c "[ `arch` == armv7l ] && printf \-lmathneon" )
10 changes: 10 additions & 0 deletions libraries/math_neon/math_neon.h
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
#pragma once
#if __has_include_next(<math_neon.h>)
#include_next <math_neon.h>
#else
#include <math.h>
// TODO: add more
#define sqrtf_neon(a) sqrtf(a)
#define sinf_neon(a) sinf(a)
#define cosf_neon(a) cosf(a)
#define expf_neon(a) expf(a)
#define logf_neon(a) logf(a)
#endif

0 comments on commit 6f42417

Please sign in to comment.