A simple example of initialising Ne10 and calling the C and NEON variants of a function.
#include <stdio.h>
#include <stdlib.h>
#define ARR_LEN 5
void test_add_dynamic(void)
{
{
}
printf("test_intro[test_add_dynamic]:\n");
{
printf("\tne10_addc_float:\t%f + %f = %f\n", src[i], cst, dst[i]);
}
}
void test_add_static(void)
{
{
}
printf("test_intro[test_add_static]:\n");
{
printf("\tne10_addc_float_c:\t%f + %f = %f\n", src[i], cst, dst_c[i]);
printf("\tne10_addc_float_neon:\t%f + %f = %f\n", src[i], cst, dst_neon[i]);
}
}
{
{
fprintf(stderr, "Failed to initialise Ne10.\n");
return 1;
}
test_add_dynamic();
test_add_static();
return 0;
}