NeBuild dev
Loading...
Searching...
No Matches
simd.hpp
Go to the documentation of this file.
1//# This file is a part of toml++ and is subject to the the terms of the MIT license.
2//# Copyright (c) Mark Gillard <mark.gillard@outlook.com.au>
3//# See https://github.com/marzer/tomlplusplus/blob/master/LICENSE for the full license text.
4// SPDX-License-Identifier: MIT
5#pragma once
6
7#include "preprocessor.hpp"
8#if TOML_ENABLE_SIMD
9
10#if defined(__SSE2__) \
11 || (defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)))
12#define TOML_HAS_SSE2 1
13#endif
14
15#if defined(__SSE4_1__) || (defined(_MSC_VER) && (defined(__AVX__) || defined(__AVX2__)))
16#define TOML_HAS_SSE4_1 1
17#endif
18
19#endif // TOML_ENABLE_SIMD
20
21#ifndef TOML_HAS_SSE2
22#define TOML_HAS_SSE2 0
23#endif
24#ifndef TOML_HAS_SSE4_1
25#define TOML_HAS_SSE4_1 0
26#endif
27
29#if TOML_HAS_SSE4_1
30#include <smmintrin.h>
31#endif
32#if TOML_HAS_SSE2
33#include <emmintrin.h>
34#endif
TOML_ENABLE_WARNINGS
Definition simd.hpp:35
TOML_DISABLE_WARNINGS
Definition simd.hpp:28