| diff --git a/library/include/NatureDSP_Signal_math.h b/library/include/NatureDSP_Signal_math.h |
| index 2ffea63..adf08ab 100644 |
| --- a/library/include/NatureDSP_Signal_math.h |
| +++ b/library/include/NatureDSP_Signal_math.h |
| @@ -38,7 +38,7 @@ extern "C" { |
| vec_log Logarithm
|
| vec_antilog Antilogarithm
|
| vec_sqrt Square Root
|
| - vec_rsqrt Reciprocal Square Root
|
| + vec_rsqrt Reciprocal Square Root
|
| vec_sine,vec_cosine Sine/Cosine
|
| vec_tan Tangent
|
| vec_atan Arctangent
|
| @@ -384,9 +384,9 @@ int32_t scl_sqrt64x32(int64_t x); |
| part left by exponent value.
|
|
|
| Mantissa accuracy is 1 LSB, so relative accuracy is:
|
| - vec_rsqrt16x16, scl_rsqrt16x16 6.2e-5
|
| - scl_rsqrt32x32 2.4e-7
|
| - vec_rsqrt32x32 9.2e-10
|
| + vec_rsqrt16x16, scl_rsqrt16x16 6.2e-5
|
| + scl_rsqrt32x32 2.4e-7
|
| + vec_rsqrt32x32 9.2e-10
|
|
|
| Precision:
|
| 16x16 16-bit inputs, 16-bit output. Accuracy: 2LSB
|
| @@ -406,11 +406,11 @@ int32_t scl_sqrt64x32(int64_t x); |
| ----------------
|
| Returned packed value:
|
| scl_rsqrt32x32():
|
| - bits 23
0 fractional part
|
| - bits 31
24 exponent
|
| + bits 23�0 fractional part
|
| + bits 31�24 exponent
|
| scl_rsqrt16x16():
|
| - bits 15
0 fractional part
|
| - bits 31
16 exponent
|
| + bits 15�0 fractional part
|
| + bits 31�16 exponent
|
|
|
| -------------------------------------------------------------------------*/
|
| void vec_rsqrt32x32 ( int32_t * frac, int16_t * exp, const int32_t * x, int N);
|
| @@ -635,6 +635,7 @@ float32_t scl_atan2f (float32_t y, float32_t x); |
| return result, Q16.15
|
| -------------------------------------------------------------------------*/
|
| void vec_tanh32x32(int32_t * y, const int32_t * x, int N);
|
| +void vec_tanhf (float32_t * y, const float32_t * x,int N);
|
| int32_t scl_tanh32x32(int32_t x);
|
|
|
| /*-------------------------------------------------------------------------
|
| @@ -659,7 +660,12 @@ int32_t scl_tanh32x32(int32_t x); |
| return result, Q16.15
|
| -------------------------------------------------------------------------*/
|
| void vec_sigmoid32x32(int32_t * y, const int32_t * x, int N);
|
| +void vec_sigmoidf (float32_t * y, const float32_t * x, int N);
|
| int32_t scl_sigmoid32x32(int32_t x);
|
| +float32_t scl_sigmoidf(float32_t x);
|
| +
|
| +void vec_relu32x32 (int32_t * y, const int32_t * x, int32_t K, int N);
|
| +void vec_reluf (float32_t * y, const float32_t * x, float32_t K, int N);
|
|
|
| /*-------------------------------------------------------------------------
|
| Softmax
|
| @@ -685,6 +691,7 @@ int32_t scl_sigmoid32x32(int32_t x); |
|
|
| -------------------------------------------------------------------------*/
|
| void vec_softmax32x32(int32_t * y, const int32_t * x, int N);
|
| +void vec_softmaxf (float32_t * y, const float32_t * x,int N);
|
|
|
| /*-------------------------------------------------------------------------
|
| Integer to float conversion
|
| diff --git a/library/include/NatureDSP_types.h b/library/include/NatureDSP_types.h |
| index a38b334..6322852 100644 |
| --- a/library/include/NatureDSP_types.h |
| +++ b/library/include/NatureDSP_types.h |
| @@ -332,7 +332,9 @@ typedef struct tagComplex32_t |
| #define NASSERT(x)
|
| #define restrict
|
| #elif defined (COMPILER_XTENSA)
|
| +#if !defined restrict
|
| #define restrict __restrict
|
| +#endif
|
| #define onchip
|
| #define NASSERT(x) {(void)__builtin_expect((x)!=0,1);}
|
| #else
|
| diff --git a/library/include_private/common.h b/library/include_private/common.h |
| index 20206e4..74d4d42 100644 |
| --- a/library/include_private/common.h |
| +++ b/library/include_private/common.h |
| @@ -157,6 +157,12 @@ __pragma (warning(pop)) |
| __asm__(".type "#name", @object\n\t.global "#name"\n\t.align 4\n\t"#name":\n\t.long 0x49438B96,0x4D73F192\n\t");
|
| #endif
|
|
|
| +#if defined(COMPILER_XTENSA)
|
| +#define DISCARD_FUN_FOR_NONVOID_RETURN(retval_type,name,arglist) \
|
| +__attribute__ ((section ("/DISCARD/"))) \
|
| +retval_type name arglist \
|
| +{ return (retval_type) 0; }
|
| +#endif
|
|
|
| #ifdef __cplusplus
|
| #define externC extern "C"
|
| diff --git a/library/include_private/fft_real_twiddles.h b/library/include_private/fft_real_twiddles.h |
| old mode 100644 |
| new mode 100755 |
| index 10cd4b2..6f5c80b |
| --- a/library/include_private/fft_real_twiddles.h |
| +++ b/library/include_private/fft_real_twiddles.h |
| @@ -44,8 +44,12 @@ |
| 7 128
|
| */
|
|
|
| +#if !defined MAX_RFFT_PWR
|
| #define MAX_RFFT_PWR 13
|
| +#endif
|
| +#if !defined MAX_RFFT_LEN
|
| #define MAX_RFFT_LEN (1<<MAX_RFFT_PWR)
|
| +#endif
|
|
|
| extern const int16_t twiddleSplit[MAX_RFFT_LEN/2];
|
|
|
| diff --git a/library/include_private/fft_real_twiddles_24x24.h b/library/include_private/fft_real_twiddles_24x24.h |
| old mode 100644 |
| new mode 100755 |
| index 3017c61..257396e |
| --- a/library/include_private/fft_real_twiddles_24x24.h |
| +++ b/library/include_private/fft_real_twiddles_24x24.h |
| @@ -44,8 +44,12 @@ |
| 7 128
|
| */
|
|
|
| +#if !defined MAX_RFFT_PWR
|
| #define MAX_RFFT_PWR 13
|
| +#endif
|
| +#if !defined MAX_RFFT_LEN
|
| #define MAX_RFFT_LEN (1<<MAX_RFFT_PWR)
|
| +#endif
|
|
|
| extern const int32_t twiddleSplit24x24[MAX_RFFT_LEN/2];
|
|
|