Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/intgemm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <kpu@users.noreply.github.com>2021-12-09 00:53:30 +0300
committerGitHub <noreply@github.com>2021-12-09 00:53:30 +0300
commit768aa689dda91f49024e647b5aee23e6b5d08556 (patch)
treee7d51bbddf1447609966209a972f49bc134336dd
parentf1f59bb3b32aad5686eeb41c742279d47be71ce8 (diff)
Reduce header noise (#94)
-rw-r--r--intgemm/intgemm.cc11
-rw-r--r--intgemm/intgemm.h12
-rw-r--r--intgemm/types.h2
3 files changed, 13 insertions, 12 deletions
diff --git a/intgemm/intgemm.cc b/intgemm/intgemm.cc
index dfb54f3..e5fe1b0 100644
--- a/intgemm/intgemm.cc
+++ b/intgemm/intgemm.cc
@@ -1,3 +1,14 @@
+#if defined(WASM)
+// No header for CPUID since it's hard-coded.
+#elif defined(__INTEL_COMPILER)
+#include <immintrin.h>
+#elif defined(_MSC_VER)
+#include <intrin.h>
+#else
+// Assume GCC and clang style.
+#include <cpuid.h>
+#endif
+
#include "intgemm.h"
#include "stats.h"
diff --git a/intgemm/intgemm.h b/intgemm/intgemm.h
index bcd3be6..2528fdb 100644
--- a/intgemm/intgemm.h
+++ b/intgemm/intgemm.h
@@ -41,7 +41,6 @@
#include <cstdint>
-#include "intgemm/intgemm_config.h"
#include "types.h"
#include "sse2_gemm.h"
#include "ssse3_gemm.h"
@@ -49,17 +48,6 @@
#include "avx512_gemm.h"
#include "avx512vnni_gemm.h"
-#if defined(WASM)
-// No header for CPUID since it's hard-coded.
-#elif defined(__INTEL_COMPILER)
-#include <immintrin.h>
-#elif defined(_MSC_VER)
-#include <intrin.h>
-#else
-// Assume GCC and clang style.
-#include <cpuid.h>
-#endif
-
/* Dispatch to functions based on runtime CPUID. This adds one call-by-variable to each call. */
namespace intgemm {
diff --git a/intgemm/types.h b/intgemm/types.h
index 81b38af..a4b35b4 100644
--- a/intgemm/types.h
+++ b/intgemm/types.h
@@ -1,4 +1,6 @@
#pragma once
+#include "intgemm/intgemm_config.h"
+
#include <exception>
#ifdef INTGEMM_COMPILER_SUPPORTS_AVX2
#include <immintrin.h>