]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - Vc/include/Vc/sse/helperimpl.tcc
update to Vc 0.7.3-dev
[u/mrichter/AliRoot.git] / Vc / include / Vc / sse / helperimpl.tcc
index 9a41d42c355692ff71e823d606f8e834c38a7dfa..03c411bac95bd2b1de396249559226c6d840659f 100644 (file)
 #ifndef VC_SSE_HELPERIMPL_TCC
 #define VC_SSE_HELPERIMPL_TCC
 
-#include "intrinsics.h"
 #include <cstdio>
 
+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 void *HelperImpl<SSE2Impl>::malloc(size_t n)
+Vc_ALWAYS_INLINE void *HelperImpl<SSE2Impl>::malloc(size_t n)
 {
     switch (A) {
         case Vc::AlignOnVector:
@@ -58,12 +54,13 @@ inline void *HelperImpl<SSE2Impl>::malloc(size_t n)
     }
 }
 
-inline void HelperImpl<SSE2Impl>::free(void *p)
+Vc_ALWAYS_INLINE void HelperImpl<SSE2Impl>::free(void *p)
 {
     _mm_free(p);
 }
 
 } // namespace Internal
 } // namespace Vc
+} // namespace AliRoot
 
 #endif // VC_SSE_HELPERIMPL_TCC