diff options
author | kpu <github@kheafield.com> | 2018-06-20 02:50:47 +0300 |
---|---|---|
committer | kpu <github@kheafield.com> | 2018-06-20 02:51:23 +0300 |
commit | 1ea34fc5326c2c3cbdb0bc188d10cb3fd5f1efd8 (patch) | |
tree | 2cb852faf16c343af5c41b4c8b883386b51b2bb9 /avx2_gemm.h | |
parent | 14cf95662cdc3de5c53918e8502cc263d1dc7c20 (diff) |
Allow headers without CPU support
Diffstat (limited to 'avx2_gemm.h')
-rw-r--r-- | avx2_gemm.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/avx2_gemm.h b/avx2_gemm.h index 293aa5c..8771d9c 100644 --- a/avx2_gemm.h +++ b/avx2_gemm.h @@ -2,13 +2,12 @@ #include <cstdint> namespace intgemm { -#ifdef __AVX2__ struct AVX2_16bit { typedef int16_t Integer; // Currently A is prepared by quantization but this could theoretically change. - static void PrepareA(const float *input, int16_t *output, float quant_mult, int rows, int cols) { + static inline void PrepareA(const float *input, int16_t *output, float quant_mult, int rows, int cols) { Quantize(input, output, quant_mult, rows * cols); } @@ -29,7 +28,7 @@ struct AVX2_8bit { typedef int8_t Integer; // Currently A is prepared by quantization but this could theoretically change. - static void PrepareA(const float *input, int8_t *output, float quant_mult, int rows, int cols) { + static inline void PrepareA(const float *input, int8_t *output, float quant_mult, int rows, int cols) { Quantize(input, output, quant_mult, rows * cols); } @@ -46,5 +45,4 @@ struct AVX2_8bit { static const char *Name() { return "AVX2 8-bit"; } }; -#endif // __AVX2__ } // namespace intgemm |