Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / simd / support.h
index 44a84dbf85c613b87971c51511e02b4cc28fe8b2..1fd891658dfbb1909a2a859081dd59b12de491ce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -56,39 +56,36 @@ namespace gmx
 /*! \brief Enumerated options for SIMD architectures */
 enum class SimdType
 {
-    None,           //!< Disable all SIMD support
-    Reference,      //!< Gromacs reference software SIMD
-    Generic,        //!< Placeholder for future support for gcc generic SIMD
-    X86_Sse2,       //!< SSE2
-    X86_Sse4_1,     //!< SSE4.1
-    X86_Avx128Fma,  //!< 128-bit Avx with FMA (Amd)
-    X86_Avx,        //!< 256-bit Avx
-    X86_Avx2,       //!< AVX2
-    X86_Avx2_128,   //!< 128-bit AVX2, better than 256-bit for AMD Ryzen
-    X86_Avx512,     //!< AVX_512
-    X86_Avx512Knl,  //!< AVX_512_KNL
-    X86_Mic,        //!< Knight's corner
-    Arm_Neon,       //!< 32-bit ARM NEON
-    Arm_NeonAsimd,  //!< 64-bit ARM AArch64 Advanced SIMD
-    Ibm_Vmx,        //!< IBM VMX SIMD (Altivec on Power6 and later)
-    Ibm_Vsx,        //!< IBM VSX SIMD (Power7 and later)
-    Fujitsu_HpcAce  //!< Fujitsu K-computer
+    None,          //!< Disable all SIMD support
+    Reference,     //!< Gromacs reference software SIMD
+    Generic,       //!< Placeholder for future support for gcc generic SIMD
+    X86_Sse2,      //!< SSE2
+    X86_Sse4_1,    //!< SSE4.1
+    X86_Avx128Fma, //!< 128-bit Avx with FMA (Amd)
+    X86_Avx,       //!< 256-bit Avx
+    X86_Avx2,      //!< AVX2
+    X86_Avx2_128,  //!< 128-bit AVX2, better than 256-bit for AMD Ryzen
+    X86_Avx512,    //!< AVX_512
+    X86_Avx512Knl, //!< AVX_512_KNL
+    X86_Mic,       //!< Knight's corner
+    Arm_Neon,      //!< 32-bit ARM NEON
+    Arm_NeonAsimd, //!< 64-bit ARM AArch64 Advanced SIMD
+    Ibm_Vmx,       //!< IBM VMX SIMD (Altivec on Power6 and later)
+    Ibm_Vsx,       //!< IBM VSX SIMD (Power7 and later)
+    Fujitsu_HpcAce //!< Fujitsu K-computer
 };
 
 /*! \libinternal \brief Return a string with the name of a SIMD type
  *
  *  \param s  SIMD type to turn into string
  */
-const std::string &
-simdString(SimdType s);
+const std::string& simdString(SimdType s);
 
 /*! \libinternal \brief Return the SIMD type that would fit this hardware best */
-SimdType
-simdSuggested(const CpuInfo &c);
+SimdType simdSuggested(const CpuInfo& c);
 
 /*! \libinternal \brief Return the SIMD type the library was compiled with */
-SimdType
-simdCompiled();
+SimdType simdCompiled();
 
 /*! \libinternal \brief Check if binary was compiled with the provided SIMD type
  *
@@ -98,10 +95,7 @@ simdCompiled();
  *                        If we do not have a match there will also be a warning.
  *  \param warnToStdErr   If true, warnings will also be printed to stderr.
  */
-bool
-simdCheck(SimdType         s,
-          FILE *           log,
-          bool             warnToStdErr);
+bool simdCheck(SimdType s, FILE* log, bool warnToStdErr);
 
 /*! \endcond */