| AIfES 2 2.0.0

aimath_q7_default.h
Go to the documentation of this file.
1
25 #ifndef AIMATH_Q7_DEFAULT
26 #define AIMATH_Q7_DEFAULT
27
28 #include <stdint.h>
29 #include <math.h>
30 #include <stdlib.h>
31
32 #include "basic/base/aimath/aimath_q7.h"
33 #include "basic/base/aimath/aimath_q31.h"
34
35
143 void aimath_q7_default_linear32(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result);
144
252 void aimath_q7_default_linear32_bt(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result);
253
290 void aimath_q7_default_mat_mul(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
291
326 void aimath_q7_default_multiply(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
327
358 void aimath_q7_default_scalar_mul(const void *scalar, const aitensor_t *a, aitensor_t *result);
359
398 void aimath_q7_default_tensor_add_different_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
399
437 void aimath_q7_default_tensor_add_same_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
438
477 void aimath_q7_default_tensor_sub_different_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
478
516 void aimath_q7_default_tensor_sub_same_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result);
517
547 void aimath_q7_default_copy_tensor(const aitensor_t *from, aitensor_t *to);
548
571 void aimath_q7_default_transpose_vector(aitensor_t *vector);
572
594 void aimath_q7_default_transpose_matrix(aitensor_t *x);
595
640 void aimath_q7_default_sigmoid(const aitensor_t *x, aitensor_t *result);
641
672 void aimath_q7_default_relu(const aitensor_t *x, aitensor_t *result);
673
707 void aimath_q7_default_d_relu(const aitensor_t *x, aitensor_t *result);
708
745 void aimath_q7_default_leaky_relu(const aitensor_t *x, const void *alpha, aitensor_t *result);
746
796 void aimath_q7_default_elu(const aitensor_t *x, const void *alpha, aitensor_t *result);
797
842 void aimath_q7_default_tanh(const aitensor_t *x, aitensor_t *result);
843
874 void aimath_q7_default_softsign(const aitensor_t *x, aitensor_t *result);
875
906 void aimath_q7_default_softmax(const aitensor_t *x, aitensor_t *result);
907
931 void aimath_q7_default_zero_tensor(aitensor_t *tensor);
932
955 void aimath_q7_default_init_zeros(aitensor_t *tensor);
956
957
958 #endif // AIMATH_Q7_DEFAULT
aimath_q31.h
Definition of the Q31 (aiq31) data-type.
aimath_q7.h
Definition of the Q7 (aiq7) data-type.
aimath_q7_default_copy_tensor
void aimath_q7_default_copy_tensor(const aitensor_t *from, aitensor_t *to)
Performs an element wise copy of Q7 tensors.
aimath_q7_default_transpose_matrix
void aimath_q7_default_transpose_matrix(aitensor_t *x)
Transpose a Q7 tensor.
aimath_q7_default_zero_tensor
void aimath_q7_default_zero_tensor(aitensor_t *tensor)
Fills a Q7 tensor with zeros.
aimath_q7_default_sigmoid
void aimath_q7_default_sigmoid(const aitensor_t *x, aitensor_t *result)
Calculates the sigmoid of each element in a Q7 tensor.
aimath_q7_default_tensor_add_same_shift
void aimath_q7_default_tensor_add_same_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise addition of Q7 tensors a and b with same shifts.
aimath_q7_default_d_relu
void aimath_q7_default_d_relu(const aitensor_t *x, aitensor_t *result)
Calculates the rectifier (ReLU) derivative of each element in a Q7 tensor.
aimath_q7_default_tensor_add_different_shift
void aimath_q7_default_tensor_add_different_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise addition of Q7 tensors a and b with different shifts.
aimath_q7_default_relu
void aimath_q7_default_relu(const aitensor_t *x, aitensor_t *result)
Calculates the rectifier (ReLU) value of each element in a Q7 tensor.
aimath_q7_default_init_zeros
void aimath_q7_default_init_zeros(aitensor_t *tensor)
Fills a Q7 tensor with zeros.
aimath_q7_default_linear32_bt
void aimath_q7_default_linear32_bt(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication of Q7 matrices a and b (transposed) and adds a Q31 vector c to eac...
aimath_q7_default_tensor_sub_different_shift
void aimath_q7_default_tensor_sub_different_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise addition of Q7 tensors a and b with different shifts.
aimath_q7_default_elu
void aimath_q7_default_elu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the exponential rectifier (ELU) value of each element in a Q7 tensor.
aimath_q7_default_softmax
void aimath_q7_default_softmax(const aitensor_t *x, aitensor_t *result)
Calculates the softmax value of each batch element (row) of a Q7 tensor.
aimath_q7_default_scalar_mul
void aimath_q7_default_scalar_mul(const void *scalar, const aitensor_t *a, aitensor_t *result)
Performs a scalar multiplication (scaling) of Q7 tensor a and a scalar.
aimath_q7_default_tensor_sub_same_shift
void aimath_q7_default_tensor_sub_same_shift(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise subtraction of Q7 tensors a and b with same shifts.
aimath_q7_default_mat_mul
void aimath_q7_default_mat_mul(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs a matrix multiplication of Q7 matrices a and b.
aimath_q7_default_leaky_relu
void aimath_q7_default_leaky_relu(const aitensor_t *x, const void *alpha, aitensor_t *result)
Calculates the leaky rectifier (leaky ReLU) value of each element in a Q7 tensor.
aimath_q7_default_tanh
void aimath_q7_default_tanh(const aitensor_t *x, aitensor_t *result)
Calculates the tanh of each element in a Q7 tensor.
aimath_q7_default_softsign
void aimath_q7_default_softsign(const aitensor_t *x, aitensor_t *result)
Calculates the softsign value of each element in a Q7 tensor.
aimath_q7_default_linear32
void aimath_q7_default_linear32(const aitensor_t *a, const aitensor_t *b, const aitensor_t *c, aitensor_t *result)
Performs a matrix multiplication of Q7 matrices a and b and adds a Q31 vector c to each row.
aimath_q7_default_transpose_vector
void aimath_q7_default_transpose_vector(aitensor_t *vector)
Transposes a Q7 vector.
aimath_q7_default_multiply
void aimath_q7_default_multiply(const aitensor_t *a, const aitensor_t *b, aitensor_t *result)
Performs an element wise multiplication of Q7 tensors a and b (Hadamard product)
aitensor
A tensor in AIfES.
Definition: aifes_math.h:89