Go to the source code of this file.
◆ main()
◆ test_mmult()
Definition at line 25 of file test_mmult.c.
26{
27
28 float *A_ptr = (
float *)
A;
29 float *B_ptr = (
float *)
B;
30 float *C_ptr = (
float *)
C;
32
33 for (
int i = 0 ; i <
m *
n; i++) {
34 A_ptr[i] = i;
35 B_ptr[i] = i;
36 }
37 for (
int i = 0 ; i <
m ; i++) {
38 for (
int j = 0 ; j <
k ; j++) {
40 for (
int s = 0 ; s <
n ; s++) {
42 }
44 }
45 }
50
51 for (
int i = 0 ; i <
m ; i++) {
52 for (
int j = 0 ; j <
k ; j++) {
53 printf(
"[%i][%i] calc=%f, expected =%f\n", i, j,
C[i][j],
C_compare[i][j]);
54 }
55 }
56
57 for (
int i = 0 ; i <
m *
k ; i++) {
58 if (Cc_ptr[i] != C_ptr[i]) {
59 printf("Error - C_ptr= %f, Cc_ptr= %f \n", C_ptr[i], Cc_ptr[i]);
60 return;
61 }
62 }
63
64 printf("Test Pass!\n");
65}
esp_err_t dspm_mult_f32_aes3(const float *A, const float *B, float *C, int m, int n, int k)
esp_err_t dspm_mult_f32_ae32(const float *A, const float *B, float *C, int m, int n, int k)
void xt_iss_profile_disable()
void xt_iss_profile_enable()
References A, B, C, C_compare, dspm_mult_f32_ae32(), dspm_mult_f32_aes3(), k, m, n, xt_iss_profile_disable(), and xt_iss_profile_enable().
Referenced by main().