]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Vc/include/Vc/avx/helperimpl.tcc
update to Vc 0.7.3-dev
[u/mrichter/AliRoot.git] / Vc / include / Vc / avx / helperimpl.tcc
index 2ca8eb4f18005224b0760f9e9b0902b16de0f3c6..b6150cba028d76c53cd50f31335f4f36f1809d41 100644 (file)
 #ifndef VC_AVX_HELPERIMPL_TCC
 #define VC_AVX_HELPERIMPL_TCC
 
+namespace AliRoot {
 namespace Vc
 {
 namespace Internal
 {
 
 template<size_t X>
-static inline size_t nextMultipleOf(size_t value)
+static _VC_CONSTEXPR size_t nextMultipleOf(size_t value)
 {
-    const size_t offset = value % X;
-    if ( offset > 0 ) {
-        return value + X - offset;
-    }
-    return value;
+    return (value % X) > 0 ? value + X - (value % X) : value;
 }
 
 template<Vc::MallocAlignment A>
-inline ALWAYS_INLINE void *HelperImpl<AVXImpl>::malloc(size_t n)
+Vc_ALWAYS_INLINE void *HelperImpl<AVXImpl>::malloc(size_t n)
 {
     switch (A) {
         case Vc::AlignOnVector:
@@ -55,12 +52,13 @@ inline ALWAYS_INLINE void *HelperImpl<AVXImpl>::malloc(size_t n)
     }
 }
 
-inline ALWAYS_INLINE void HelperImpl<AVXImpl>::free(void *p)
+Vc_ALWAYS_INLINE void HelperImpl<AVXImpl>::free(void *p)
 {
     _mm_free(p);
 }
 
 } // namespace Internal
 } // namespace Vc
+} // namespace AliRoot
 
 #endif // VC_AVX_HELPERIMPL_TCC