MRPT  1.9.9
SSE_macros.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 // Useful macro for masks used in _mm_shuffle_epi8()
13 #define BUILD_128BIT_CONST( \
14  _name, B0, B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, B13, B14, \
15  B15) \
16  alignas(MRPT_MAX_STATIC_ALIGN_BYTES) const __m128i _name = _mm_setr_epi8( \
17  0x##B15, 0x##B14, 0x##B13, 0x##B12, 0x##B11, 0x##B10, 0x##B9, 0x##B8, \
18  0x##B7, 0x##B6, 0x##B5, 0x##B4, 0x##B3, 0x##B2, 0x##B1, 0x##B0);
19 
20 #if defined(_MSC_VER)
21 #define SSE_DISABLE_WARNINGS \
22  __pragma(warning(push)) __pragma(warning(disable : 4309))
23 #elif defined(__GNUC__)
24 #define SSE_DISABLE_WARNINGS \
25  _Pragma("GCC diagnostic push") \
26  _Pragma("GCC diagnostic ignored \"-Wsign-conversion\"")
27 #elif defined(__clang__)
28 #define SSE_DISABLE_WARNINGS \
29  _Pragma("clang diagnostic push") \
30  _Pragma("clang diagnostic ignored \"-Wsign-conversion\"")
31 #endif
32 
33 #if defined(_MSC_VER)
34 #define SSE_RESTORE_SIGN_WARNINGS __pragma(warning(pop))
35 #elif defined(__GNUC__)
36 #define SSE_RESTORE_SIGN_WARNINGS _Pragma("GCC diagnostic pop")
37 #elif defined(__clang__)
38 #define SSE_RESTORE_SIGN_WARNINGS _Pragma("clang diagnostic pop")
39 #endif



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 9690a7a25 Mon Feb 24 17:42:02 2020 +0100 at lun feb 24 18:00:10 CET 2020