49 ne10_float32_t thesrc[5];
50 ne10_float32_t thecst;
51 ne10_float32_t thedst[5];
53 for (i = 0; i < 5; i++)
55 thesrc[i] = (ne10_float32_t) rand() / RAND_MAX * 5.0f;
57 thecst = (ne10_float32_t) rand() / RAND_MAX * 5.0f;
71 ne10_float32_t thesrc[5];
72 ne10_float32_t thecst;
73 ne10_float32_t thedst1[5];
74 ne10_float32_t thedst2[5];
75 for (i = 0; i < 5; i++)
77 thesrc[i] = (ne10_float32_t) rand() / RAND_MAX * 5.0f;
79 thecst = (ne10_float32_t) rand() / RAND_MAX * 5.0f;
81 ne10_addc_float_c (thedst1 , thesrc, thecst, 5);
82 ne10_addc_float_neon (thedst2 , thesrc, thecst, 5);
94 printf (
"Going to initialze NE10...\n");
97 if (status != NE10_OK)
98 printf (
"NE10 init failed.\n");
100 printf (
"NE10 has been initialized.\n");
void test_add2(void)
This test code shows you how to call Ne10 functions directly.
ne10_result_t(* ne10_addc_float)(ne10_float32_t *dst, ne10_float32_t *src, const ne10_float32_t cst, ne10_uint32_t count)
Adds a constant scalar value to all the elements of an input array and stores the results in an outpu...
void test_add1(void)
This test code shows you how to call Ne10 functions with auto detecting NEON hardware.