InPlay API
|
HAL HWACC. More...
Enumerations | |
enum | hwacc_op_t { HWACC_OP_COPY = 0, HWACC_OP_ADD = 1, HWACC_OP_SUB = 2, HWACC_OP_MUL = 3, HWACC_OP_INV = 4, HWACC_OP_EQU = 5, HWACC_OP_CLEAR = 6, HWACC_OP_SCALE = 7 } |
hwacc operator More... | |
enum | hwacc_status_t { HWACC_ERR_OK = 0, HWACC_ERR_CONFIG_ERROR = 1, HWACC_ERR_INST_OVERFLOW = 2, HWACC_ERR_ALREADY_INIT = 3, HWACC_ERR_NOT_INIT = 4, HWACC_ERR_BAD_STATE = 5, HWACC_ERR_DIMENSION_MISMATCH = 6, HWACC_ERR_BAD_INPUT = 7 } |
HWACC function status return. More... | |
Functions | |
int | hal_hwacc_open (void) |
Initialize hardware accelerator driver. More... | |
int | hal_hwacc_close (void) |
Clean-up hardware accelerator driver. More... | |
int | hal_hwacc_write_matrix (hwacc_matrix_desc_t *matrix, const float *head) |
Write matrix into hardware accelerator memory blocks. More... | |
int | hal_hwacc_read_matrix (hwacc_matrix_desc_t *matrix, float *head) |
Read matrix data from hardware accelerator memory blocks. More... | |
int | hal_hwacc_insert_inst (hwacc_matrix_desc_t *matrix_C, int C_symm, hwacc_matrix_desc_t *matrix_A, int A_trans, hwacc_matrix_desc_t *matrix_B, int B_trans, hwacc_op_t op) |
Insert instruction into queue. More... | |
int | hal_hwacc_execute (void) |
Execute HW Accelerator instructions in queue. More... | |
HAL HWACC.
enum hwacc_op_t |
hwacc operator
enum hwacc_status_t |
HWACC function status return.
int hal_hwacc_close | ( | void | ) |
Clean-up hardware accelerator driver.
int hal_hwacc_execute | ( | void | ) |
Execute HW Accelerator instructions in queue.
int hal_hwacc_insert_inst | ( | hwacc_matrix_desc_t * | matrix_C, |
int | C_symm, | ||
hwacc_matrix_desc_t * | matrix_A, | ||
int | A_trans, | ||
hwacc_matrix_desc_t * | matrix_B, | ||
int | B_trans, | ||
hwacc_op_t | op | ||
) |
Insert instruction into queue.
[in] | matrix_C | Pointer to matrix descriptor object of output matrix C. |
[in] | C_symm | 1 if result matrix is symmetric (using this property saves HW operations). |
[in] | matrix_A | Pointer to matrix descriptor object of input matrix A. |
[in] | A_trans | 1 if input matrix A needs to be transposed for the operation. |
[in] | matrix_B | Pointer to matrix descriptor object of input matrix B. |
[in] | B_trans | 1 if input matrix B needs to be transposed for the operation. |
[in] | op | Instruction operation. |
int hal_hwacc_open | ( | void | ) |
Initialize hardware accelerator driver.
int hal_hwacc_read_matrix | ( | hwacc_matrix_desc_t * | matrix, |
float * | head | ||
) |
Read matrix data from hardware accelerator memory blocks.
[in] | matrix | Pointer to matrix descriptor object of matrix to be read. |
[in] | head | Pointer to data of new matrix in row-major format. Data will be size 4-bytes per matrix index. |
int hal_hwacc_write_matrix | ( | hwacc_matrix_desc_t * | matrix, |
const float * | head | ||
) |
Write matrix into hardware accelerator memory blocks.
[in] | matrix | Pointer to matrix descriptor object of new matrix to be written. |
[in] | head | Pointer to data of new matrix in row-major format. Data should be size 4-bytes per matrix index. |