make style

This commit is contained in:
iceman1001
2026-08-29 17:42:29 +02:00
parent a0a3eb4bbf
commit 35c098d489
197 changed files with 30157 additions and 35538 deletions
+1 -1
View File
@@ -94,4 +94,4 @@ $(ARMLIB): $(ARMLIB_OBJ) | $(OBJDIR)
$(call ARMLIB_REGISTER_RULES)
-include $(ARMLIB_DEP)
endif
endif
File diff suppressed because it is too large Load Diff
+75 -79
View File
@@ -56,10 +56,9 @@ extern "C" {
* @{
*/
typedef enum
{
I2C_MEM_ADDR_WIDIH_8 = 0x01, /*!< memory address is 8 bit */
I2C_MEM_ADDR_WIDIH_16 = 0x02, /*!< memory address is 16 bit */
typedef enum {
I2C_MEM_ADDR_WIDIH_8 = 0x01, /*!< memory address is 8 bit */
I2C_MEM_ADDR_WIDIH_16 = 0x02, /*!< memory address is 16 bit */
} i2c_mem_address_width_type;
/**
@@ -70,16 +69,15 @@ typedef enum
* @{
*/
typedef enum
{
I2C_INT_MA_TX = 0,
I2C_INT_MA_RX,
I2C_INT_SLA_TX,
I2C_INT_SLA_RX,
I2C_DMA_MA_TX,
I2C_DMA_MA_RX,
I2C_DMA_SLA_TX,
I2C_DMA_SLA_RX,
typedef enum {
I2C_INT_MA_TX = 0,
I2C_INT_MA_RX,
I2C_INT_SLA_TX,
I2C_INT_SLA_RX,
I2C_DMA_MA_TX,
I2C_DMA_MA_RX,
I2C_DMA_SLA_TX,
I2C_DMA_SLA_RX,
} i2c_mode_type;
/**
@@ -90,28 +88,27 @@ typedef enum
* @{
*/
typedef enum
{
I2C_OK = 0, /*!< no error */
I2C_ERR_STEP_1, /*!< step 1 error */
I2C_ERR_STEP_2, /*!< step 2 error */
I2C_ERR_STEP_3, /*!< step 3 error */
I2C_ERR_STEP_4, /*!< step 4 error */
I2C_ERR_STEP_5, /*!< step 5 error */
I2C_ERR_STEP_6, /*!< step 6 error */
I2C_ERR_STEP_7, /*!< step 7 error */
I2C_ERR_STEP_8, /*!< step 8 error */
I2C_ERR_STEP_9, /*!< step 9 error */
I2C_ERR_STEP_10, /*!< step 10 error */
I2C_ERR_STEP_11, /*!< step 11 error */
I2C_ERR_STEP_12, /*!< step 12 error */
I2C_ERR_TCRLD, /*!< tcrld error */
I2C_ERR_TDC, /*!< tdc error */
I2C_ERR_ADDR, /*!< addr error */
I2C_ERR_STOP, /*!< stop error */
I2C_ERR_ACKFAIL, /*!< ackfail error */
I2C_ERR_TIMEOUT, /*!< timeout error */
I2C_ERR_INTERRUPT, /*!< interrupt error */
typedef enum {
I2C_OK = 0, /*!< no error */
I2C_ERR_STEP_1, /*!< step 1 error */
I2C_ERR_STEP_2, /*!< step 2 error */
I2C_ERR_STEP_3, /*!< step 3 error */
I2C_ERR_STEP_4, /*!< step 4 error */
I2C_ERR_STEP_5, /*!< step 5 error */
I2C_ERR_STEP_6, /*!< step 6 error */
I2C_ERR_STEP_7, /*!< step 7 error */
I2C_ERR_STEP_8, /*!< step 8 error */
I2C_ERR_STEP_9, /*!< step 9 error */
I2C_ERR_STEP_10, /*!< step 10 error */
I2C_ERR_STEP_11, /*!< step 11 error */
I2C_ERR_STEP_12, /*!< step 12 error */
I2C_ERR_TCRLD, /*!< tcrld error */
I2C_ERR_TDC, /*!< tdc error */
I2C_ERR_ADDR, /*!< addr error */
I2C_ERR_STOP, /*!< stop error */
I2C_ERR_ACKFAIL, /*!< ackfail error */
I2C_ERR_TIMEOUT, /*!< timeout error */
I2C_ERR_INTERRUPT, /*!< interrupt error */
} i2c_status_type;
/**
@@ -122,18 +119,17 @@ typedef enum
* @{
*/
typedef struct
{
i2c_type *i2cx; /*!< i2c registers base address */
uint8_t *pbuff; /*!< pointer to i2c transfer buffer */
__IO uint16_t psize; /*!< i2c transfer size */
__IO uint16_t pcount; /*!< i2c transfer counter */
__IO uint32_t mode; /*!< i2c communication mode */
__IO uint32_t status; /*!< i2c communication status */
__IO i2c_status_type error_code; /*!< i2c error code */
dma_channel_type *dma_tx_channel; /*!< dma transmit channel */
dma_channel_type *dma_rx_channel; /*!< dma receive channel */
dma_init_type dma_init_struct; /*!< dma init parameters */
typedef struct {
i2c_type *i2cx; /*!< i2c registers base address */
uint8_t *pbuff; /*!< pointer to i2c transfer buffer */
__IO uint16_t psize; /*!< i2c transfer size */
__IO uint16_t pcount; /*!< i2c transfer counter */
__IO uint32_t mode; /*!< i2c communication mode */
__IO uint32_t status; /*!< i2c communication status */
__IO i2c_status_type error_code; /*!< i2c error code */
dma_channel_type *dma_tx_channel; /*!< dma transmit channel */
dma_channel_type *dma_rx_channel; /*!< dma receive channel */
dma_init_type dma_init_struct; /*!< dma init parameters */
} i2c_handle_type;
/**
@@ -144,43 +140,43 @@ typedef struct
* @{
*/
void i2c_config (i2c_handle_type* hi2c);
void i2c_lowlevel_init (i2c_handle_type* hi2c);
void i2c_reset_ctrl2_register (i2c_handle_type* hi2c);
i2c_status_type i2c_wait_end (i2c_handle_type* hi2c, uint32_t timeout);
i2c_status_type i2c_wait_flag (i2c_handle_type* hi2c, uint32_t flag, uint32_t event_check, uint32_t timeout);
void i2c_config(i2c_handle_type *hi2c);
void i2c_lowlevel_init(i2c_handle_type *hi2c);
void i2c_reset_ctrl2_register(i2c_handle_type *hi2c);
i2c_status_type i2c_wait_end(i2c_handle_type *hi2c, uint32_t timeout);
i2c_status_type i2c_wait_flag(i2c_handle_type *hi2c, uint32_t flag, uint32_t event_check, uint32_t timeout);
i2c_status_type i2c_master_transmit (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_transmit(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_transmit_int (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive_int (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit_int (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive_int (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_transmit_int(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive_int(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit_int(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive_int(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_transmit_dma (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive_dma (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_transmit_dma(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_master_receive_dma(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_transmit_dma(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_slave_receive_dma(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_master_transmit (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_master_receive (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_slave_transmit (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_slave_receive (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_master_transmit(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_master_receive(i2c_handle_type *hi2c, uint16_t address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_smbus_slave_receive(i2c_handle_type *hi2c, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write_int (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write_dma (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read_int (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read_dma (i2c_handle_type* hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write_int(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_write_dma(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read_int(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
i2c_status_type i2c_memory_read_dma(i2c_handle_type *hi2c, i2c_mem_address_width_type mem_address_width, uint16_t address, uint16_t mem_address, uint8_t *pdata, uint16_t size, uint32_t timeout);
void i2c_evt_irq_handler (i2c_handle_type* hi2c);
void i2c_err_irq_handler (i2c_handle_type* hi2c);
void i2c_dma_tx_irq_handler (i2c_handle_type* hi2c);
void i2c_dma_rx_irq_handler (i2c_handle_type* hi2c);
void i2c_evt_irq_handler(i2c_handle_type *hi2c);
void i2c_err_irq_handler(i2c_handle_type *hi2c);
void i2c_dma_tx_irq_handler(i2c_handle_type *hi2c);
void i2c_dma_rx_irq_handler(i2c_handle_type *hi2c);
/**
* @}
File diff suppressed because it is too large Load Diff
@@ -38,90 +38,90 @@ extern "C"
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES)
/* F16 */
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_16)
extern const float16_t twiddleCoefF16_16[32];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
/* F16 */
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_16)
extern const float16_t twiddleCoefF16_16[32];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_32)
extern const float16_t twiddleCoefF16_32[64];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_32)
extern const float16_t twiddleCoefF16_32[64];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_64)
extern const float16_t twiddleCoefF16_64[128];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_64)
extern const float16_t twiddleCoefF16_64[128];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_128)
extern const float16_t twiddleCoefF16_128[256];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_128)
extern const float16_t twiddleCoefF16_128[256];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_256)
extern const float16_t twiddleCoefF16_256[512];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_256)
extern const float16_t twiddleCoefF16_256[512];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_512)
extern const float16_t twiddleCoefF16_512[1024];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_512)
extern const float16_t twiddleCoefF16_512[1024];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_1024)
extern const float16_t twiddleCoefF16_1024[2048];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_1024)
extern const float16_t twiddleCoefF16_1024[2048];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_2048)
extern const float16_t twiddleCoefF16_2048[4096];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_2048)
extern const float16_t twiddleCoefF16_2048[4096];
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#define twiddleCoefF16 twiddleCoefF16_4096
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_32)
extern const float16_t twiddleCoefF16_rfft_32[32];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_F16_4096)
extern const float16_t twiddleCoefF16_4096[8192];
#define twiddleCoefF16 twiddleCoefF16_4096
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) */
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_64)
extern const float16_t twiddleCoefF16_rfft_64[64];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_128)
extern const float16_t twiddleCoefF16_rfft_128[128];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_32)
extern const float16_t twiddleCoefF16_rfft_32[32];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_256)
extern const float16_t twiddleCoefF16_rfft_256[256];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_64)
extern const float16_t twiddleCoefF16_rfft_64[64];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_512)
extern const float16_t twiddleCoefF16_rfft_512[512];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_128)
extern const float16_t twiddleCoefF16_rfft_128[128];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_1024)
extern const float16_t twiddleCoefF16_rfft_1024[1024];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_256)
extern const float16_t twiddleCoefF16_rfft_256[256];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_2048)
extern const float16_t twiddleCoefF16_rfft_2048[2048];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_512)
extern const float16_t twiddleCoefF16_rfft_512[512];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_4096)
extern const float16_t twiddleCoefF16_rfft_4096[4096];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_1024)
extern const float16_t twiddleCoefF16_rfft_1024[1024];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_2048)
extern const float16_t twiddleCoefF16_rfft_2048[2048];
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || defined(ARM_TABLE_TWIDDLECOEF_RFFT_F16_4096)
extern const float16_t twiddleCoefF16_rfft_4096[4096];
#endif
#endif /* ARMAC5 */
#endif /* ARMAC5 */
#endif /* !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_FFT_ALLOW_TABLES) */
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE)
extern const float16_t exp_tab_f16[8];
extern const float16_t __logf_lut_f16[8];
extern const float16_t exp_tab_f16[8];
extern const float16_t __logf_lut_f16[8];
#endif /* (defined(ARM_MATH_MVEF) || defined(ARM_MATH_HELIUM)) && !defined(ARM_MATH_AUTOVECTORIZE) */
#endif
#endif
#ifdef __cplusplus
}
@@ -129,4 +129,4 @@ extern "C"
#endif /* _ARM_COMMON_TABLES_F16_H */
@@ -38,45 +38,45 @@
extern "C"
{
#endif
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len16;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len32;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len64;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len128;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len256;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len512;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len1024;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len2048;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len4096;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len16;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len32;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len64;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len128;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len256;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len512;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len1024;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len2048;
extern const arm_cfft_instance_f64 arm_cfft_sR_f64_len4096;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len16;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len32;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len64;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len128;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len256;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len512;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len1024;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len2048;
extern const arm_cfft_instance_f32 arm_cfft_sR_f32_len4096;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len16;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len32;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len64;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len128;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len256;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len512;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len1024;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len2048;
extern const arm_cfft_instance_q31 arm_cfft_sR_q31_len4096;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len16;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len32;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len64;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len128;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len256;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len512;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len1024;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len2048;
extern const arm_cfft_instance_q15 arm_cfft_sR_q15_len4096;
#ifdef __cplusplus
}
@@ -41,33 +41,33 @@ extern "C"
#endif
#if !defined(__CC_ARM) && defined(ARM_FLOAT16_SUPPORTED)
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len16;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len32;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len64;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len128;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len256;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len512;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_16) && defined(ARM_TABLE_BITREVIDX_FLT_16))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len16;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_32) && defined(ARM_TABLE_BITREVIDX_FLT_32))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len32;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_64) && defined(ARM_TABLE_BITREVIDX_FLT_64))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len64;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_128) && defined(ARM_TABLE_BITREVIDX_FLT_128))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len128;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_256) && defined(ARM_TABLE_BITREVIDX_FLT_256))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len256;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_512) && defined(ARM_TABLE_BITREVIDX_FLT_512))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len512;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_1024) && defined(ARM_TABLE_BITREVIDX_FLT_1024))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len1024;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_2048) && defined(ARM_TABLE_BITREVIDX_FLT_2048))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len2048;
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FFT_TABLES) || (defined(ARM_TABLE_TWIDDLECOEF_F16_4096) && defined(ARM_TABLE_BITREVIDX_FLT_4096))
extern const arm_cfft_instance_f16 arm_cfft_sR_f16_len4096;
#endif
#endif
#ifdef __cplusplus
@@ -53,8 +53,7 @@ Definitions available for MVEF only
***************************************/
#if (defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEF)) && !defined(ARM_MATH_AUTOVECTORIZE)
__STATIC_FORCEINLINE float32_t vecAddAcrossF32Mve(float32x4_t in)
{
__STATIC_FORCEINLINE float32_t vecAddAcrossF32Mve(float32x4_t in) {
float32_t acc;
acc = vgetq_lane(in, 0) + vgetq_lane(in, 1) +
@@ -94,8 +93,7 @@ Definitions available for f16 datatype with HW acceleration only
#if defined(ARM_FLOAT16_SUPPORTED)
#if defined (ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
__STATIC_FORCEINLINE float16_t vecAddAcrossF16Mve(float16x8_t in)
{
__STATIC_FORCEINLINE float16_t vecAddAcrossF16Mve(float16x8_t in) {
float16x8_t tmpVec;
_Float16 acc;
@@ -109,8 +107,7 @@ __STATIC_FORCEINLINE float16_t vecAddAcrossF16Mve(float16x8_t in)
}
__STATIC_FORCEINLINE float16x8_t __mve_cmplx_sum_intra_vec_f16(
float16x8_t vecIn)
{
float16x8_t vecIn) {
float16x8_t vecTmp, vecOut;
uint32_t tmp;
@@ -127,7 +124,7 @@ __STATIC_FORCEINLINE float16x8_t __mve_cmplx_sum_intra_vec_f16(
/*
* shift left, random tmp insertion in bottom
*/
vecOut = vreinterpretq_f16_s32(vshlcq_s32(vreinterpretq_s32_f16(vecOut) , &tmp, 32));
vecOut = vreinterpretq_f16_s32(vshlcq_s32(vreinterpretq_s32_f16(vecOut), &tmp, 32));
/*
* Compute:
* DONTCARE | DONTCARE | re0+re1+re0+re1 |im0+im1+im0+im1
@@ -151,8 +148,7 @@ __STATIC_FORCEINLINE float16x8_t __mve_cmplx_sum_intra_vec_f16(
__STATIC_FORCEINLINE void mve_cmplx_sum_intra_vec_f16(
float16x8_t vecIn,
float16_t *pOut)
{
float16_t *pOut) {
float16x8_t vecOut = __mve_cmplx_sum_intra_vec_f16(vecIn);
/*
* Cmplx sum is in 4rd & 5th f16 elt
@@ -179,7 +175,7 @@ __STATIC_FORCEINLINE void mve_cmplx_sum_intra_vec_f16(
}
#endif
#endif
#endif
/***************************************
@@ -189,9 +185,8 @@ Definitions available for MVEI and MVEF only
#if (defined (ARM_MATH_HELIUM) || defined(ARM_MATH_MVEF) || defined(ARM_MATH_MVEI)) && !defined(ARM_MATH_AUTOVECTORIZE)
/* Following functions are used to transpose matrix in f32 and q31 cases */
__STATIC_INLINE arm_status arm_mat_trans_32bit_2x2_mve(
uint32_t * pDataSrc,
uint32_t * pDataDest)
{
uint32_t *pDataSrc,
uint32_t *pDataDest) {
static const uint32x4_t vecOffs = { 0, 2, 1, 3 };
/*
*
@@ -206,9 +201,8 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_2x2_mve(
}
__STATIC_INLINE arm_status arm_mat_trans_32bit_3x3_mve(
uint32_t * pDataSrc,
uint32_t * pDataDest)
{
uint32_t *pDataSrc,
uint32_t *pDataDest) {
const uint32x4_t vecOffs1 = { 0, 3, 6, 1};
const uint32x4_t vecOffs2 = { 4, 7, 2, 5};
/*
@@ -229,8 +223,7 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_3x3_mve(
return (ARM_MATH_SUCCESS);
}
__STATIC_INLINE arm_status arm_mat_trans_32bit_4x4_mve(uint32_t * pDataSrc, uint32_t * pDataDest)
{
__STATIC_INLINE arm_status arm_mat_trans_32bit_4x4_mve(uint32_t *pDataSrc, uint32_t *pDataDest) {
/*
* 4x4 Matrix transposition
* is 4 x de-interleave operation
@@ -259,9 +252,8 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_4x4_mve(uint32_t * pDataSrc, uint
__STATIC_INLINE arm_status arm_mat_trans_32bit_generic_mve(
uint16_t srcRows,
uint16_t srcCols,
uint32_t * pDataSrc,
uint32_t * pDataDest)
{
uint32_t *pDataSrc,
uint32_t *pDataDest) {
uint32x4_t vecOffs;
uint32_t i;
uint32_t blkCnt;
@@ -273,16 +265,14 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_generic_mve(
vecOffs = vecOffs * srcCols;
i = srcCols;
do
{
do {
pDataC = (uint32_t const *) pDataSrc;
pDataDestR = pDataDest;
blkCnt = srcRows >> 2;
while (blkCnt > 0U)
{
while (blkCnt > 0U) {
vecIn = vldrwq_gather_shifted_offset_u32(pDataC, vecOffs);
vstrwq(pDataDestR, vecIn);
vstrwq(pDataDestR, vecIn);
pDataDestR += 4;
pDataC = pDataC + srcCols * 4;
/*
@@ -295,8 +285,7 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_generic_mve(
* tail
*/
blkCnt = srcRows & 3;
if (blkCnt > 0U)
{
if (blkCnt > 0U) {
mve_pred16_t p0 = vctp32q(blkCnt);
vecIn = vldrwq_gather_shifted_offset_u32(pDataC, vecOffs);
vstrwq_p(pDataDestR, vecIn, p0);
@@ -304,8 +293,7 @@ __STATIC_INLINE arm_status arm_mat_trans_32bit_generic_mve(
pDataSrc += 1;
pDataDest += srcRows;
}
while (--i);
} while (--i);
return (ARM_MATH_SUCCESS);
}
@@ -316,8 +304,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit(
uint32_t *pDataSrc,
uint16_t dstRows,
uint16_t dstCols,
uint32_t *pDataDest)
{
uint32_t *pDataDest) {
uint32_t i;
uint32_t const *pDataC;
uint32_t *pDataRow;
@@ -330,8 +317,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit(
/*
* Check for matrix mismatch condition
*/
if ((srcRows != dstCols) || (srcCols != dstRows))
{
if ((srcRows != dstCols) || (srcCols != dstRows)) {
/*
* Set status as ARM_MATH_SIZE_MISMATCH
*/
@@ -352,31 +338,28 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit(
pDataRow = pDataSrc;
pDataDestRow = pDataDest;
i = srcCols;
do
{
do {
pDataC = (uint32_t const *) pDataRow;
pDataDestR = pDataDestRow;
vecOffsCur = vecOffsRef;
blkCnt = (srcRows * CMPLX_DIM) >> 2;
while (blkCnt > 0U)
{
while (blkCnt > 0U) {
vecIn = vldrwq_gather_shifted_offset(pDataC, vecOffsCur);
vstrwq(pDataDestR, vecIn);
vstrwq(pDataDestR, vecIn);
pDataDestR += 4;
vecOffsCur = vaddq(vecOffsCur, (srcCols << 2));
/*
* Decrement the blockSize loop counter
*/
blkCnt--;
blkCnt--;
}
/*
* tail
* (will be merged thru tail predication)
*/
blkCnt = (srcRows * CMPLX_DIM) & 3;
if (blkCnt > 0U)
{
if (blkCnt > 0U) {
mve_pred16_t p0 = vctp32q(blkCnt);
vecIn = vldrwq_gather_shifted_offset(pDataC, vecOffsCur);
vstrwq_p(pDataDestR, vecIn, p0);
@@ -384,14 +367,12 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_32bit(
pDataRow += CMPLX_DIM;
pDataDestRow += (srcRows * CMPLX_DIM);
}
while (--i);
} while (--i);
return (ARM_MATH_SUCCESS);
}
__STATIC_INLINE arm_status arm_mat_trans_16bit_2x2(uint16_t * pDataSrc, uint16_t * pDataDest)
{
__STATIC_INLINE arm_status arm_mat_trans_16bit_2x2(uint16_t *pDataSrc, uint16_t *pDataDest) {
pDataDest[0] = pDataSrc[0];
pDataDest[3] = pDataSrc[3];
pDataDest[2] = pDataSrc[1];
@@ -400,8 +381,7 @@ __STATIC_INLINE arm_status arm_mat_trans_16bit_2x2(uint16_t * pDataSrc, uint16_t
return (ARM_MATH_SUCCESS);
}
__STATIC_INLINE arm_status arm_mat_trans_16bit_3x3_mve(uint16_t * pDataSrc, uint16_t * pDataDest)
{
__STATIC_INLINE arm_status arm_mat_trans_16bit_3x3_mve(uint16_t *pDataSrc, uint16_t *pDataDest) {
static const uint16_t stridesTr33[8] = { 0, 3, 6, 1, 4, 7, 2, 5 };
uint16x8_t vecOffs1;
uint16x8_t vecIn1;
@@ -423,13 +403,12 @@ __STATIC_INLINE arm_status arm_mat_trans_16bit_3x3_mve(uint16_t * pDataSrc, uint
}
__STATIC_INLINE arm_status arm_mat_trans_16bit_4x4_mve(uint16_t * pDataSrc, uint16_t * pDataDest)
{
__STATIC_INLINE arm_status arm_mat_trans_16bit_4x4_mve(uint16_t *pDataSrc, uint16_t *pDataDest) {
static const uint16_t stridesTr44_1[8] = { 0, 4, 8, 12, 1, 5, 9, 13 };
static const uint16_t stridesTr44_2[8] = { 2, 6, 10, 14, 3, 7, 11, 15 };
uint16x8_t vecOffs1, vecOffs2;
uint16x8_t vecIn1, vecIn2;
uint16_t const * pDataSrcVec = (uint16_t const *) pDataSrc;
uint16_t const *pDataSrcVec = (uint16_t const *) pDataSrc;
/*
* 4x4 Matrix transposition
@@ -458,9 +437,8 @@ __STATIC_INLINE arm_status arm_mat_trans_16bit_4x4_mve(uint16_t * pDataSrc, uint
__STATIC_INLINE arm_status arm_mat_trans_16bit_generic(
uint16_t srcRows,
uint16_t srcCols,
uint16_t * pDataSrc,
uint16_t * pDataDest)
{
uint16_t *pDataSrc,
uint16_t *pDataDest) {
uint16x8_t vecOffs;
uint32_t i;
uint32_t blkCnt;
@@ -472,16 +450,14 @@ __STATIC_INLINE arm_status arm_mat_trans_16bit_generic(
vecOffs = vecOffs * srcCols;
i = srcCols;
while(i > 0U)
{
while (i > 0U) {
pDataC = (uint16_t const *) pDataSrc;
pDataDestR = pDataDest;
blkCnt = srcRows >> 3;
while (blkCnt > 0U)
{
while (blkCnt > 0U) {
vecIn = vldrhq_gather_shifted_offset_u16(pDataC, vecOffs);
vstrhq_u16(pDataDestR, vecIn);
vstrhq_u16(pDataDestR, vecIn);
pDataDestR += 8;
pDataC = pDataC + srcCols * 8;
/*
@@ -494,8 +470,7 @@ __STATIC_INLINE arm_status arm_mat_trans_16bit_generic(
* tail
*/
blkCnt = srcRows & 7;
if (blkCnt > 0U)
{
if (blkCnt > 0U) {
mve_pred16_t p0 = vctp16q(blkCnt);
vecIn = vldrhq_gather_shifted_offset_u16(pDataC, vecOffs);
vstrhq_p_u16(pDataDestR, vecIn, p0);
@@ -515,8 +490,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
uint16_t *pDataSrc,
uint16_t dstRows,
uint16_t dstCols,
uint16_t *pDataDest)
{
uint16_t *pDataDest) {
static const uint16_t loadCmplxCol[8] = { 0, 0, 1, 1, 2, 2, 3, 3 };
int i;
uint16x8_t vecOffsRef, vecOffsCur;
@@ -530,8 +504,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
/*
* Check for matrix mismatch condition
*/
if ((srcRows != dstCols) || (srcCols != dstRows))
{
if ((srcRows != dstCols) || (srcCols != dstRows)) {
/*
* Set status as ARM_MATH_SIZE_MISMATCH
*/
@@ -551,24 +524,22 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
* build [0, 1, 2xcol, 2xcol+1, 4xcol, 4xcol+1, 6xcol, 6xcol+1]
*/
vecOffsRef = vldrhq_u16((uint16_t const *) loadCmplxCol);
vecOffsRef = vmulq(vecOffsRef, (uint16_t) (srcCols * CMPLX_DIM))
+ viwdupq_u16((uint32_t)0, (uint16_t) 2, 1);
vecOffsRef = vmulq(vecOffsRef, (uint16_t)(srcCols * CMPLX_DIM))
+ viwdupq_u16((uint32_t)0, (uint16_t) 2, 1);
pDataRow = pDataSrc;
pDataDestRow = pDataDest;
i = srcCols;
do
{
do {
pDataC = (uint16_t const *) pDataRow;
pDataDestR = pDataDestRow;
vecOffsCur = vecOffsRef;
blkCnt = (srcRows * CMPLX_DIM) >> 3;
while (blkCnt > 0U)
{
while (blkCnt > 0U) {
vecIn = vldrhq_gather_shifted_offset(pDataC, vecOffsCur);
vstrhq(pDataDestR, vecIn);
pDataDestR+= 8; // VEC_LANES_U16
vstrhq(pDataDestR, vecIn);
pDataDestR += 8; // VEC_LANES_U16
vecOffsCur = vaddq(vecOffsCur, (srcCols << 3));
/*
* Decrement the blockSize loop counter
@@ -580,8 +551,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
* (will be merged thru tail predication)
*/
blkCnt = (srcRows * CMPLX_DIM) & 0x7;
if (blkCnt > 0U)
{
if (blkCnt > 0U) {
mve_pred16_t p0 = vctp16q(blkCnt);
vecIn = vldrhq_gather_shifted_offset(pDataC, vecOffsCur);
vstrhq_p(pDataDestR, vecIn, p0);
@@ -589,8 +559,7 @@ __STATIC_INLINE arm_status arm_mat_cmplx_trans_16bit(
pDataRow += CMPLX_DIM;
pDataDestRow += (srcRows * CMPLX_DIM);
}
while (--i);
} while (--i);
return (ARM_MATH_SUCCESS);
}
@@ -610,8 +579,7 @@ Definitions available for MVEI only
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q31_MVE)
__STATIC_INLINE q31x4_t FAST_VSQRT_Q31(q31x4_t vecIn)
{
__STATIC_INLINE q31x4_t FAST_VSQRT_Q31(q31x4_t vecIn) {
q63x2_t vecTmpLL;
q31x4_t vecTmp0, vecTmp1;
q31_t scale;
@@ -678,8 +646,7 @@ __STATIC_INLINE q31x4_t FAST_VSQRT_Q31(q31x4_t vecIn)
#endif
#if !defined(ARM_DSP_CONFIG_TABLES) || defined(ARM_ALL_FAST_TABLES) || defined(ARM_TABLE_FAST_SQRT_Q15_MVE)
__STATIC_INLINE q15x8_t FAST_VSQRT_Q15(q15x8_t vecIn)
{
__STATIC_INLINE q15x8_t FAST_VSQRT_Q15(q15x8_t vecIn) {
q31x4_t vecTmpLev, vecTmpLodd, vecSignL;
q15x8_t vecTmp0, vecTmp1;
q15x8_t vecNrm, vecDst, vecIdx, vecSignBits;
@@ -29,7 +29,7 @@
* \section intro Introduction
*
* This user manual describes the CMSIS DSP software library,
* a suite of common signal processing functions for use on Cortex-M and Cortex-A processor
* a suite of common signal processing functions for use on Cortex-M and Cortex-A processor
* based devices.
*
* The library is divided into a number of functions each covering a specific category:
@@ -101,12 +101,12 @@
* - ARM_MATH_NEON:
*
* Define macro ARM_MATH_NEON to enable Neon versions of the DSP functions.
* It is not enabled by default when Neon is available because performances are
* It is not enabled by default when Neon is available because performances are
* dependent on the compiler and target architecture.
*
* - ARM_MATH_NEON_EXPERIMENTAL:
*
* Define macro ARM_MATH_NEON_EXPERIMENTAL to enable experimental Neon versions of
* Define macro ARM_MATH_NEON_EXPERIMENTAL to enable experimental Neon versions of
* of some DSP functions. Experimental Neon versions currently do not have better
* performances than the scalar versions.
*
@@ -191,7 +191,7 @@
#include "dsp/none.h"
#include "dsp/utils.h"
#include "dsp/basic_math_functions.h"
#include "dsp/basic_math_functions.h"
#include "dsp/interpolation_functions.h"
#include "dsp/bayes_functions.h"
#include "dsp/matrix_functions.h"
@@ -40,23 +40,23 @@ extern "C"
@deprecated
*/
#if defined ( __CC_ARM )
#define __SIMD32_TYPE int32_t __packed
#define __SIMD32_TYPE int32_t __packed
#elif defined ( __ARMCC_VERSION ) && ( __ARMCC_VERSION >= 6010050 )
#define __SIMD32_TYPE int32_t
#define __SIMD32_TYPE int32_t
#elif defined ( __GNUC__ )
#define __SIMD32_TYPE int32_t
#define __SIMD32_TYPE int32_t
#elif defined ( __ICCARM__ )
#define __SIMD32_TYPE int32_t __packed
#define __SIMD32_TYPE int32_t __packed
#elif defined ( __TI_ARM__ )
#define __SIMD32_TYPE int32_t
#define __SIMD32_TYPE int32_t
#elif defined ( __CSMC__ )
#define __SIMD32_TYPE int32_t
#define __SIMD32_TYPE int32_t
#elif defined ( __TASKING__ )
#define __SIMD32_TYPE __un(aligned) int32_t
#define __SIMD32_TYPE __un(aligned) int32_t
#elif defined(_MSC_VER )
#define __SIMD32_TYPE int32_t
#define __SIMD32_TYPE int32_t
#else
#error Unknown compiler
#error Unknown compiler
#endif
#define __SIMD32(addr) (*(__SIMD32_TYPE **) & (addr))
@@ -73,18 +73,17 @@ extern "C"
@param[in] pQ15 points to input value
@return Q31 value
*/
__STATIC_FORCEINLINE q31_t read_q15x2 (
q15_t const * pQ15)
{
q31_t val;
__STATIC_FORCEINLINE q31_t read_q15x2(
q15_t const *pQ15) {
q31_t val;
#ifdef __ARM_FEATURE_UNALIGNED
memcpy (&val, pQ15, 4);
memcpy(&val, pQ15, 4);
#else
val = (pQ15[1] << 16) | (pQ15[0] & 0x0FFFF) ;
val = (pQ15[1] << 16) | (pQ15[0] & 0x0FFFF) ;
#endif
return (val);
return (val);
}
/**
@@ -107,19 +106,18 @@ __STATIC_FORCEINLINE q31_t read_q15x2 (
@param[in] value Q31 value
@return none
*/
__STATIC_FORCEINLINE void write_q15x2_ia (
q15_t ** pQ15,
q31_t value)
{
q31_t val = value;
__STATIC_FORCEINLINE void write_q15x2_ia(
q15_t **pQ15,
q31_t value) {
q31_t val = value;
#ifdef __ARM_FEATURE_UNALIGNED
memcpy (*pQ15, &val, 4);
memcpy(*pQ15, &val, 4);
#else
(*pQ15)[0] = (q15_t)(val & 0x0FFFF);
(*pQ15)[1] = (q15_t)((val >> 16) & 0x0FFFF);
(*pQ15)[0] = (q15_t)(val & 0x0FFFF);
(*pQ15)[1] = (q15_t)((val >> 16) & 0x0FFFF);
#endif
*pQ15 += 2;
*pQ15 += 2;
}
/**
@@ -128,17 +126,16 @@ __STATIC_FORCEINLINE void write_q15x2_ia (
@param[in] value Q31 value
@return none
*/
__STATIC_FORCEINLINE void write_q15x2 (
q15_t * pQ15,
q31_t value)
{
q31_t val = value;
__STATIC_FORCEINLINE void write_q15x2(
q15_t *pQ15,
q31_t value) {
q31_t val = value;
#ifdef __ARM_FEATURE_UNALIGNED
memcpy (pQ15, &val, 4);
memcpy(pQ15, &val, 4);
#else
pQ15[0] = (q15_t)(val & 0x0FFFF);
pQ15[1] = (q15_t)(val >> 16);
pQ15[0] = (q15_t)(val & 0x0FFFF);
pQ15[1] = (q15_t)(val >> 16);
#endif
}
@@ -148,17 +145,16 @@ __STATIC_FORCEINLINE void write_q15x2 (
@param[in] pQ7 points to input value
@return Q31 value
*/
__STATIC_FORCEINLINE q31_t read_q7x4 (
q7_t const * pQ7)
{
q31_t val;
__STATIC_FORCEINLINE q31_t read_q7x4(
q7_t const *pQ7) {
q31_t val;
#ifdef __ARM_FEATURE_UNALIGNED
memcpy (&val, pQ7, 4);
memcpy(&val, pQ7, 4);
#else
val =((pQ7[3] & 0x0FF) << 24) | ((pQ7[2] & 0x0FF) << 16) | ((pQ7[1] & 0x0FF) << 8) | (pQ7[0] & 0x0FF);
#endif
return (val);
val = ((pQ7[3] & 0x0FF) << 24) | ((pQ7[2] & 0x0FF) << 16) | ((pQ7[1] & 0x0FF) << 8) | (pQ7[0] & 0x0FF);
#endif
return (val);
}
/**
@@ -181,21 +177,20 @@ __STATIC_FORCEINLINE q31_t read_q7x4 (
@param[in] value Q31 value
@return none
*/
__STATIC_FORCEINLINE void write_q7x4_ia (
q7_t ** pQ7,
q31_t value)
{
q31_t val = value;
__STATIC_FORCEINLINE void write_q7x4_ia(
q7_t **pQ7,
q31_t value) {
q31_t val = value;
#ifdef __ARM_FEATURE_UNALIGNED
memcpy (*pQ7, &val, 4);
memcpy(*pQ7, &val, 4);
#else
(*pQ7)[0] = (q7_t)(val & 0x0FF);
(*pQ7)[1] = (q7_t)((val >> 8) & 0x0FF);
(*pQ7)[2] = (q7_t)((val >> 16) & 0x0FF);
(*pQ7)[3] = (q7_t)((val >> 24) & 0x0FF);
(*pQ7)[0] = (q7_t)(val & 0x0FF);
(*pQ7)[1] = (q7_t)((val >> 8) & 0x0FF);
(*pQ7)[2] = (q7_t)((val >> 16) & 0x0FF);
(*pQ7)[3] = (q7_t)((val >> 24) & 0x0FF);
#endif
*pQ7 += 4;
*pQ7 += 4;
}
File diff suppressed because it is too large Load Diff
@@ -50,44 +50,43 @@ won't be built.
*/
#if !(__ARM_FEATURE_MVE & 2)
#if !defined(DISABLEFLOAT16)
#if defined(__ARM_FP16_FORMAT_IEEE) || defined(__ARM_FP16_FORMAT_ALTERNATIVE)
typedef __fp16 float16_t;
#define ARM_FLOAT16_SUPPORTED
#endif
#endif
#if !defined(DISABLEFLOAT16)
#if defined(__ARM_FP16_FORMAT_IEEE) || defined(__ARM_FP16_FORMAT_ALTERNATIVE)
typedef __fp16 float16_t;
#define ARM_FLOAT16_SUPPORTED
#endif
#endif
#else
/* When Vector float16, this flag is always defined and can't be disabled */
#define ARM_FLOAT16_SUPPORTED
/* When Vector float16, this flag is always defined and can't be disabled */
#define ARM_FLOAT16_SUPPORTED
#endif
#if defined(ARM_MATH_NEON) || (defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)) /* floating point vector*/
#if defined(ARM_MATH_MVE_FLOAT16) || defined(ARM_MATH_NEON_FLOAT16)
/**
* @brief 16-bit floating-point 128-bit vector data type
*/
typedef __ALIGNED(2) float16x8_t f16x8_t;
/**
* @brief 16-bit floating-point 128-bit vector data type
*/
typedef __ALIGNED(2) float16x8_t f16x8_t;
/**
* @brief 16-bit floating-point 128-bit vector pair data type
*/
typedef float16x8x2_t f16x8x2_t;
/**
* @brief 16-bit floating-point 128-bit vector pair data type
*/
typedef float16x8x2_t f16x8x2_t;
/**
* @brief 16-bit floating-point 128-bit vector quadruplet data type
*/
typedef float16x8x4_t f16x8x4_t;
/**
* @brief 16-bit floating-point 128-bit vector quadruplet data type
*/
typedef float16x8x4_t f16x8x4_t;
/**
* @brief 16-bit ubiquitous 128-bit vector data type
*/
typedef union _any16x8_t
{
float16x8_t f;
int16x8_t i;
} any16x8_t;
/**
* @brief 16-bit ubiquitous 128-bit vector data type
*/
typedef union _any16x8_t {
float16x8_t f;
int16x8_t i;
} any16x8_t;
#endif
#endif
@@ -96,39 +95,38 @@ won't be built.
#if defined(ARM_MATH_NEON_FLOAT16)
/**
* @brief 16-bit float 64-bit vector data type.
*/
typedef __ALIGNED(2) float16x4_t f16x4_t;
/**
* @brief 16-bit float 64-bit vector data type.
*/
typedef __ALIGNED(2) float16x4_t f16x4_t;
/**
* @brief 16-bit floating-point 128-bit vector triplet data type
*/
typedef float16x8x3_t f16x8x3_t;
/**
* @brief 16-bit floating-point 128-bit vector triplet data type
*/
typedef float16x8x3_t f16x8x3_t;
/**
* @brief 16-bit floating-point 64-bit vector pair data type
*/
typedef float16x4x2_t f16x4x2_t;
/**
* @brief 16-bit floating-point 64-bit vector pair data type
*/
typedef float16x4x2_t f16x4x2_t;
/**
* @brief 16-bit floating-point 64-bit vector triplet data type
*/
typedef float16x4x3_t f16x4x3_t;
/**
* @brief 16-bit floating-point 64-bit vector triplet data type
*/
typedef float16x4x3_t f16x4x3_t;
/**
* @brief 16-bit floating-point 64-bit vector quadruplet data type
*/
typedef float16x4x4_t f16x4x4_t;
/**
* @brief 16-bit floating-point 64-bit vector quadruplet data type
*/
typedef float16x4x4_t f16x4x4_t;
/**
* @brief 16-bit ubiquitous 64-bit vector data type
*/
typedef union _any16x4_t
{
float16x4_t f;
int16x4_t i;
} any16x4_t;
/**
* @brief 16-bit ubiquitous 64-bit vector data type
*/
typedef union _any16x4_t {
float16x4_t f;
int16x4_t i;
} any16x4_t;
#endif
#endif
@@ -27,8 +27,8 @@
* limitations under the License.
*/
#ifndef _ARM_MVE_TABLES_H
#define _ARM_MVE_TABLES_H
#ifndef _ARM_MVE_TABLES_H
#define _ARM_MVE_TABLES_H
#include "arm_math_types.h"
@@ -38,7 +38,7 @@ extern "C"
#endif
#if defined(ARM_MATH_MVEF) && !defined(ARM_MATH_AUTOVECTORIZE)
@@ -27,8 +27,8 @@
* limitations under the License.
*/
#ifndef _ARM_MVE_TABLES_F16_H
#define _ARM_MVE_TABLES_F16_H
#ifndef _ARM_MVE_TABLES_F16_H
#define _ARM_MVE_TABLES_F16_H
#include "arm_math_types_f16.h"
@@ -38,7 +38,7 @@ extern "C"
#endif
#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
@@ -39,13 +39,12 @@ extern "C"
#define INV_NEWTON_INIT_F32 0x7EF127EA
static const float32_t __logf_rng_f32=0.693147180f;
static const float32_t __logf_rng_f32 = 0.693147180f;
/* fast inverse approximation (3x newton) */
__STATIC_INLINE f32x4_t vrecip_medprec_f32(
f32x4_t x)
{
f32x4_t x) {
q31x4_t m;
f32x4_t b;
any32x4_t xinv;
@@ -77,8 +76,7 @@ __STATIC_INLINE f32x4_t vrecip_medprec_f32(
/* fast inverse approximation (4x newton) */
__STATIC_INLINE f32x4_t vrecip_hiprec_f32(
f32x4_t x)
{
f32x4_t x) {
q31x4_t m;
f32x4_t b;
any32x4_t xinv;
@@ -113,8 +111,7 @@ __STATIC_INLINE f32x4_t vrecip_hiprec_f32(
}
__STATIC_INLINE f32x4_t vdiv_f32(
f32x4_t num, f32x4_t den)
{
f32x4_t num, f32x4_t den) {
return vmulq(num, vrecip_hiprec_f32(den));
}
@@ -126,9 +123,8 @@ __STATIC_INLINE f32x4_t vdiv_f32(
*/
__STATIC_INLINE f32x4_t vtaylor_polyq_f32(
f32x4_t x,
const float32_t * coeffs)
{
f32x4_t x,
const float32_t *coeffs) {
f32x4_t A = vfmasq(vdupq_n_f32(coeffs[4]), x, coeffs[0]);
f32x4_t B = vfmasq(vdupq_n_f32(coeffs[6]), x, coeffs[2]);
f32x4_t C = vfmasq(vdupq_n_f32(coeffs[5]), x, coeffs[1]);
@@ -142,8 +138,7 @@ __STATIC_INLINE f32x4_t vtaylor_polyq_f32(
__STATIC_INLINE f32x4_t vmant_exp_f32(
f32x4_t x,
int32x4_t * e)
{
int32x4_t *e) {
any32x4_t r;
int32x4_t n;
@@ -157,8 +152,7 @@ __STATIC_INLINE f32x4_t vmant_exp_f32(
}
__STATIC_INLINE f32x4_t vlogq_f32(f32x4_t vecIn)
{
__STATIC_INLINE f32x4_t vlogq_f32(f32x4_t vecIn) {
q31x4_t vecExpUnBiased;
f32x4_t vecTmpFlt0, vecTmpFlt1;
f32x4_t vecAcc0, vecAcc1, vecAcc2, vecAcc3;
@@ -218,8 +212,7 @@ __STATIC_INLINE f32x4_t vlogq_f32(f32x4_t vecIn)
}
__STATIC_INLINE f32x4_t vexpq_f32(
f32x4_t x)
{
f32x4_t x) {
// Perform range reduction [-log(2),log(2)]
int32x4_t m = vcvtq_s32_f32(vmulq_n_f32(x, 1.4426950408f));
f32x4_t val = vfmsq_f32(x, vcvtq_f32_s32(m), vdupq_n_f32(0.6931471805f));
@@ -228,14 +221,13 @@ __STATIC_INLINE f32x4_t vexpq_f32(
f32x4_t poly = vtaylor_polyq_f32(val, exp_tab);
// Reconstruct
poly = (f32x4_t) (vqaddq_s32((q31x4_t) (poly), vqshlq_n_s32(m, 23)));
poly = (f32x4_t)(vqaddq_s32((q31x4_t)(poly), vqshlq_n_s32(m, 23)));
poly = vdupq_m(poly, 0.0f, vcmpltq_n_s32(m, -126));
return poly;
}
__STATIC_INLINE f32x4_t arm_vec_exponent_f32(f32x4_t x, int32_t nb)
{
__STATIC_INLINE f32x4_t arm_vec_exponent_f32(f32x4_t x, int32_t nb) {
f32x4_t r = x;
nb--;
while (nb > 0) {
@@ -245,8 +237,7 @@ __STATIC_INLINE f32x4_t arm_vec_exponent_f32(f32x4_t x, int32_t nb)
return (r);
}
__STATIC_INLINE f32x4_t vrecip_f32(f32x4_t vecIn)
{
__STATIC_INLINE f32x4_t vrecip_f32(f32x4_t vecIn) {
f32x4_t vecSx, vecW, vecTmp;
any32x4_t v;
@@ -276,8 +267,7 @@ __STATIC_INLINE f32x4_t vrecip_f32(f32x4_t vecIn)
}
__STATIC_INLINE f32x4_t vtanhq_f32(
f32x4_t val)
{
f32x4_t val) {
f32x4_t x =
vminnmq_f32(vmaxnmq_f32(val, vdupq_n_f32(-10.f)), vdupq_n_f32(10.0f));
f32x4_t exp2x = vexpq_f32(vmulq_n_f32(x, 2.f));
@@ -289,8 +279,7 @@ __STATIC_INLINE f32x4_t vtanhq_f32(
__STATIC_INLINE f32x4_t vpowq_f32(
f32x4_t val,
f32x4_t n)
{
f32x4_t n) {
return vexpq_f32(vmulq_f32(n, vlogq_f32(val)));
}
@@ -309,21 +298,18 @@ __STATIC_INLINE f32x4_t vpowq_f32(
* @return x^nb
*
*/
__STATIC_INLINE float32x4_t arm_vec_exponent_f32(float32x4_t x, int32_t nb)
{
__STATIC_INLINE float32x4_t arm_vec_exponent_f32(float32x4_t x, int32_t nb) {
float32x4_t r = x;
nb --;
while(nb > 0)
{
r = vmulq_f32(r , x);
while (nb > 0) {
r = vmulq_f32(r, x);
nb--;
}
return(r);
return (r);
}
__STATIC_INLINE float32x4_t __arm_vec_sqrt_f32_neon(float32x4_t x)
{
__STATIC_INLINE float32x4_t __arm_vec_sqrt_f32_neon(float32x4_t x) {
float32x4_t x1 = vmaxq_f32(x, vdupq_n_f32(FLT_MIN));
float32x4_t e = vrsqrteq_f32(x1);
e = vmulq_f32(vrsqrtsq_f32(vmulq_f32(x1, e), e), e);
@@ -331,31 +317,29 @@ __STATIC_INLINE float32x4_t __arm_vec_sqrt_f32_neon(float32x4_t x)
return vmulq_f32(x, e);
}
__STATIC_INLINE int16x8_t __arm_vec_sqrt_q15_neon(int16x8_t vec)
{
__STATIC_INLINE int16x8_t __arm_vec_sqrt_q15_neon(int16x8_t vec) {
float32x4_t tempF;
int32x4_t tempHI,tempLO;
int32x4_t tempHI, tempLO;
tempLO = vmovl_s16(vget_low_s16(vec));
tempF = vcvtq_n_f32_s32(tempLO,15);
tempF = vcvtq_n_f32_s32(tempLO, 15);
tempF = __arm_vec_sqrt_f32_neon(tempF);
tempLO = vcvtq_n_s32_f32(tempF,15);
tempLO = vcvtq_n_s32_f32(tempF, 15);
tempHI = vmovl_s16(vget_high_s16(vec));
tempF = vcvtq_n_f32_s32(tempHI,15);
tempF = vcvtq_n_f32_s32(tempHI, 15);
tempF = __arm_vec_sqrt_f32_neon(tempF);
tempHI = vcvtq_n_s32_f32(tempF,15);
tempHI = vcvtq_n_s32_f32(tempF, 15);
return(vcombine_s16(vqmovn_s32(tempLO),vqmovn_s32(tempHI)));
return (vcombine_s16(vqmovn_s32(tempLO), vqmovn_s32(tempHI)));
}
__STATIC_INLINE int32x4_t __arm_vec_sqrt_q31_neon(int32x4_t vec)
{
float32x4_t temp;
__STATIC_INLINE int32x4_t __arm_vec_sqrt_q31_neon(int32x4_t vec) {
float32x4_t temp;
temp = vcvtq_n_f32_s32(vec,31);
temp = __arm_vec_sqrt_f32_neon(temp);
return(vcvtq_n_s32_f32(temp,31));
temp = vcvtq_n_f32_s32(vec, 31);
temp = __arm_vec_sqrt_f32_neon(temp);
return (vcvtq_n_s32_f32(temp, 31));
}
#endif /* (defined(ARM_MATH_NEON) || defined(ARM_MATH_NEON_EXPERIMENTAL)) && !defined(ARM_MATH_AUTOVECTORIZE) */
@@ -41,12 +41,11 @@ extern "C"
#if defined(ARM_MATH_MVE_FLOAT16) && !defined(ARM_MATH_AUTOVECTORIZE)
static const float16_t __logf_rng_f16=0.693147180f16;
static const float16_t __logf_rng_f16 = 0.693147180f16;
/* fast inverse approximation (3x newton) */
__STATIC_INLINE f16x8_t vrecip_medprec_f16(
f16x8_t x)
{
f16x8_t x) {
q15x8_t m;
f16x8_t b;
any16x8_t xinv;
@@ -79,8 +78,7 @@ __STATIC_INLINE f16x8_t vrecip_medprec_f16(
/* fast inverse approximation (4x newton) */
__STATIC_INLINE f16x8_t vrecip_hiprec_f16(
f16x8_t x)
{
f16x8_t x) {
q15x8_t m;
f16x8_t b;
any16x8_t xinv;
@@ -115,8 +113,7 @@ __STATIC_INLINE f16x8_t vrecip_hiprec_f16(
}
__STATIC_INLINE f16x8_t vdiv_f16(
f16x8_t num, f16x8_t den)
{
f16x8_t num, f16x8_t den) {
return vmulq(num, vrecip_hiprec_f16(den));
}
@@ -129,9 +126,8 @@ __STATIC_INLINE f16x8_t vdiv_f16(
*/
__STATIC_INLINE float16x8_t vtaylor_polyq_f16(
float16x8_t x,
const float16_t * coeffs)
{
float16x8_t x,
const float16_t *coeffs) {
float16x8_t A = vfmasq(vdupq_n_f16(coeffs[4]), x, coeffs[0]);
float16x8_t B = vfmasq(vdupq_n_f16(coeffs[6]), x, coeffs[2]);
float16x8_t C = vfmasq(vdupq_n_f16(coeffs[5]), x, coeffs[1]);
@@ -155,8 +151,7 @@ __STATIC_INLINE float16x8_t vtaylor_polyq_f16(
vecExpUnBiased = n; \
vecTmpFlt1 = r.f;
__STATIC_INLINE float16x8_t vlogq_f16(float16x8_t vecIn)
{
__STATIC_INLINE float16x8_t vlogq_f16(float16x8_t vecIn) {
q15x8_t vecExpUnBiased;
float16x8_t vecTmpFlt0, vecTmpFlt1;
float16x8_t vecAcc0, vecAcc1, vecAcc2, vecAcc3;
@@ -216,8 +211,7 @@ __STATIC_INLINE float16x8_t vlogq_f16(float16x8_t vecIn)
}
__STATIC_INLINE float16x8_t vexpq_f16(
float16x8_t x)
{
float16x8_t x) {
// Perform range reduction [-log(2),log(2)]
int16x8_t m = vcvtq_s16_f16(vmulq_n_f16(x, 1.4426950408f16));
float16x8_t val = vfmsq_f16(x, vcvtq_f16_s16(m), vdupq_n_f16(0.6931471805f16));
@@ -226,14 +220,13 @@ __STATIC_INLINE float16x8_t vexpq_f16(
float16x8_t poly = vtaylor_polyq_f16(val, exp_tab_f16);
// Reconstruct
poly = (float16x8_t) (vqaddq_s16((int16x8_t) (poly), vqshlq_n_s16(m, 10)));
poly = (float16x8_t)(vqaddq_s16((int16x8_t)(poly), vqshlq_n_s16(m, 10)));
poly = vdupq_m_n_f16(poly, 0.0f16, vcmpltq_n_s16(m, -14));
return poly;
}
__STATIC_INLINE float16x8_t arm_vec_exponent_f16(float16x8_t x, int16_t nb)
{
__STATIC_INLINE float16x8_t arm_vec_exponent_f16(float16x8_t x, int16_t nb) {
float16x8_t r = x;
nb--;
while (nb > 0) {
@@ -245,15 +238,13 @@ __STATIC_INLINE float16x8_t arm_vec_exponent_f16(float16x8_t x, int16_t nb)
__STATIC_INLINE f16x8_t vpowq_f16(
f16x8_t val,
f16x8_t n)
{
f16x8_t n) {
return vexpq_f16(vmulq_f16(n, vlogq_f16(val)));
}
#define INV_NEWTON_INIT_F16 0x7773
__STATIC_INLINE f16x8_t vrecip_f16(f16x8_t vecIn)
{
__STATIC_INLINE f16x8_t vrecip_f16(f16x8_t vecIn) {
f16x8_t vecSx, vecW, vecTmp;
any16x8_t v;
@@ -283,8 +274,7 @@ __STATIC_INLINE f16x8_t vrecip_f16(f16x8_t vecIn)
}
__STATIC_INLINE f16x8_t vtanhq_f16(
f16x8_t val)
{
f16x8_t val) {
f16x8_t x =
vminnmq_f16(vmaxnmq_f16(val, vdupq_n_f16(-10.f16)), vdupq_n_f16(10.0f16));
f16x8_t exp2x = vexpq_f16(vmulq_n_f16(x, 2.f16));
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -31,251 +31,251 @@
* Arm Compiler 4/5
*/
#if defined ( __CC_ARM )
#include "cmsis_armcc.h"
#include "cmsis_armcc.h"
/*
* Arm Compiler 6.6 LTM (armclang)
*/
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050) && (__ARMCC_VERSION < 6100100)
#include "cmsis_armclang_ltm.h"
#include "cmsis_armclang_ltm.h"
/*
* Arm Compiler above 6.10.1 (armclang)
*/
/*
* Arm Compiler above 6.10.1 (armclang)
*/
#elif defined (__ARMCC_VERSION) && (__ARMCC_VERSION >= 6100100)
#include "cmsis_armclang.h"
#include "cmsis_armclang.h"
/*
* GNU Compiler
*/
#elif defined ( __GNUC__ )
#include "cmsis_gcc.h"
#include "cmsis_gcc.h"
/*
* IAR Compiler
*/
#elif defined ( __ICCARM__ )
#include <cmsis_iccarm.h>
#include <cmsis_iccarm.h>
/*
* TI Arm Compiler
*/
#elif defined ( __TI_ARM__ )
#include <cmsis_ccs.h>
#include <cmsis_ccs.h>
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __attribute__((packed))
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __attribute__((packed))
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __attribute__((packed))
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
#ifndef __RESTRICT
#define __RESTRICT __restrict
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __attribute__((packed))
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __attribute__((packed))
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __attribute__((packed))
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void*)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __attribute__((aligned(x)))
#endif
#ifndef __RESTRICT
#define __RESTRICT __restrict
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
/*
* TASKING Compiler
*/
#elif defined ( __TASKING__ )
/*
* The CMSIS functions have been implemented as intrinsics in the compiler.
* Please use "carm -?i" to get an up to date list of all intrinsics,
* Including the CMSIS ones.
*/
/*
* The CMSIS functions have been implemented as intrinsics in the compiler.
* Please use "carm -?i" to get an up to date list of all intrinsics,
* Including the CMSIS ones.
*/
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __packed__
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __packed__
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __packed__
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __packed__ T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __align(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
#ifndef __ASM
#define __ASM __asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
#define __NO_RETURN __attribute__((noreturn))
#endif
#ifndef __USED
#define __USED __attribute__((used))
#endif
#ifndef __WEAK
#define __WEAK __attribute__((weak))
#endif
#ifndef __PACKED
#define __PACKED __packed__
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT struct __packed__
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION union __packed__
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
struct __packed__ T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#define __ALIGNED(x) __align(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
/*
* COSMIC Compiler
*/
#elif defined ( __CSMC__ )
#include <cmsis_csm.h>
#include <cmsis_csm.h>
#ifndef __ASM
#define __ASM _asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
// NO RETURN is automatically detected hence no warning here
#define __NO_RETURN
#endif
#ifndef __USED
#warning No compiler specific solution for __USED. __USED is ignored.
#define __USED
#endif
#ifndef __WEAK
#define __WEAK __weak
#endif
#ifndef __PACKED
#define __PACKED @packed
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT @packed struct
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION @packed union
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
@packed struct T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
#define __ALIGNED(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
#ifndef __ASM
#define __ASM _asm
#endif
#ifndef __INLINE
#define __INLINE inline
#endif
#ifndef __STATIC_INLINE
#define __STATIC_INLINE static inline
#endif
#ifndef __STATIC_FORCEINLINE
#define __STATIC_FORCEINLINE __STATIC_INLINE
#endif
#ifndef __NO_RETURN
// NO RETURN is automatically detected hence no warning here
#define __NO_RETURN
#endif
#ifndef __USED
#warning No compiler specific solution for __USED. __USED is ignored.
#define __USED
#endif
#ifndef __WEAK
#define __WEAK __weak
#endif
#ifndef __PACKED
#define __PACKED @packed
#endif
#ifndef __PACKED_STRUCT
#define __PACKED_STRUCT @packed struct
#endif
#ifndef __PACKED_UNION
#define __PACKED_UNION @packed union
#endif
#ifndef __UNALIGNED_UINT32 /* deprecated */
@packed struct T_UINT32 { uint32_t v; };
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
#endif
#ifndef __UNALIGNED_UINT16_WRITE
__PACKED_STRUCT T_UINT16_WRITE { uint16_t v; };
#define __UNALIGNED_UINT16_WRITE(addr, val) (void)((((struct T_UINT16_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT16_READ
__PACKED_STRUCT T_UINT16_READ { uint16_t v; };
#define __UNALIGNED_UINT16_READ(addr) (((const struct T_UINT16_READ *)(const void *)(addr))->v)
#endif
#ifndef __UNALIGNED_UINT32_WRITE
__PACKED_STRUCT T_UINT32_WRITE { uint32_t v; };
#define __UNALIGNED_UINT32_WRITE(addr, val) (void)((((struct T_UINT32_WRITE *)(void *)(addr))->v) = (val))
#endif
#ifndef __UNALIGNED_UINT32_READ
__PACKED_STRUCT T_UINT32_READ { uint32_t v; };
#define __UNALIGNED_UINT32_READ(addr) (((const struct T_UINT32_READ *)(const void *)(addr))->v)
#endif
#ifndef __ALIGNED
#warning No compiler specific solution for __ALIGNED. __ALIGNED is ignored.
#define __ALIGNED(x)
#endif
#ifndef __RESTRICT
#warning No compiler specific solution for __RESTRICT. __RESTRICT is ignored.
#define __RESTRICT
#endif
#ifndef __COMPILER_BARRIER
#warning No compiler specific solution for __COMPILER_BARRIER. __COMPILER_BARRIER is ignored.
#define __COMPILER_BARRIER() (void)0
#endif
#else
#error Unknown compiler.
#error Unknown compiler.
#endif

Some files were not shown because too many files have changed in this diff Show More