/* kernels.h - prototypes for every matvec variant in the kit. * y = W * x, W is rows x cols, row-major, x has cols elements, y has rows. * Float kernels need cols % 16 == 0, INT8 kernels need cols % 32 == 0, * and W, x, y aligned to 16 bytes (bench.c aligns to 64). */ #ifndef KERNELS_H #define KERNELS_H #include /* 1: naive C, built at -O0 (naive_o0.c) */ void matvec_f32_naive(const float *W, const float *x, float *y, int rows, int cols); void matvec_i8_naive (const int8_t *W, const int8_t *x, int32_t *y, int rows, int cols); /* 2 and 5: plain C, built at -O3 so GCC may auto-vectorize (kernels_c.c) */ void matvec_f32_c_o3(const float *W, const float *x, float *y, int rows, int cols); void matvec_i8_c_o3 (const int8_t *W, const int8_t *x, int32_t *y, int rows, int cols); /* 3 and 6: NEON intrinsics (kernels_neon.c) */ void matvec_f32_intr(const float *W, const float *x, float *y, int rows, int cols); void matvec_i8_intr (const int8_t *W, const int8_t *x, int32_t *y, int rows, int cols); /* 4 and 7: hand-written ARMv7 NEON assembly (matvec_neon.S) */ void matvec_f32_asm(const float *W, const float *x, float *y, int rows, int cols); void matvec_i8_asm (const int8_t *W, const int8_t *x, int32_t *y, int rows, int cols); #endif