34 #define CPUINFO_BUFFER_SIZE (1024*4) 48 FILE* infofile = NULL;
54 infofile = fopen (
"/proc/cpuinfo",
"r");
58 fprintf(stderr,
"ERROR: couldn't read file \"/proc/cpuinfo\".\n");
62 bytes = fread (cpuinfo, 1,
sizeof (cpuinfo), infofile);
67 fprintf (stderr,
"ERROR: Couldn't read the file \"/proc/cpuinfo\". NE10_init() failed.\n");
71 while (
'\0' != cpuinfo[i])
77 if (strstr ((
const char *)cpuinfo,
"neon") != NULL ||
78 strstr ((
const char *)cpuinfo,
"asimd") != NULL)
86 #if defined (NE10_ENABLE_MATH) 90 fprintf(stderr,
"ERROR: init math failed\n");
95 #if defined (NE10_ENABLE_DSP) 99 fprintf(stderr,
"ERROR: init dsp failed\n");
104 #if defined (NE10_ENABLE_IMGPROC) 108 fprintf(stderr,
"ERROR: init imgproc failed\n");
113 #if defined (NE10_ENABLE_PHYSICS) 117 fprintf(stderr,
"ERROR: init imgproc failed\n");
ne10_result_t is_NEON_available
ne10_result_t ne10_init_math(ne10_int32_t is_NEON_available)
ne10_result_t ne10_init()
ne10_result_t ne10_init_physics(ne10_int32_t is_NEON_available)
ne10_result_t ne10_init_imgproc(ne10_int32_t is_NEON_available)
#define CPUINFO_BUFFER_SIZE
ne10_result_t ne10_HasNEON()
ne10_result_t ne10_init_dsp(ne10_int32_t is_NEON_available)