First Commit
This commit is contained in:
20
externals/boost/libs/atomic/config/Jamfile.v2
vendored
Normal file
20
externals/boost/libs/atomic/config/Jamfile.v2
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# Copyright Andrey Semashev 2020.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt or copy at
|
||||
# http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
|
||||
import atomic-arch-config ;
|
||||
|
||||
lib synchronization ;
|
||||
explicit synchronization ;
|
||||
|
||||
exe has_synchronization_lib : has_synchronization_lib.cpp : <library>synchronization ;
|
||||
explicit has_synchronization_lib ;
|
||||
|
||||
obj has_sse2 : has_sse2.cpp : <conditional>@atomic-arch-config.sse2-flags ;
|
||||
explicit has_sse2 ;
|
||||
|
||||
obj has_sse41 : has_sse41.cpp : <conditional>@atomic-arch-config.sse41-flags ;
|
||||
explicit has_sse41 ;
|
||||
17
externals/boost/libs/atomic/config/has_sse2.cpp
vendored
Normal file
17
externals/boost/libs/atomic/config/has_sse2.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright Andrey Semashev 2020.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <emmintrin.h>
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
__m128i mm = _mm_setzero_si128();
|
||||
mm = _mm_cmpeq_epi32(mm, mm);
|
||||
mm = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(mm), _mm_castsi128_ps(mm), _MM_SHUFFLE(2, 0, 2, 0)));
|
||||
mm = _mm_packs_epi32(mm, mm);
|
||||
return _mm_movemask_epi8(mm);
|
||||
}
|
||||
17
externals/boost/libs/atomic/config/has_sse41.cpp
vendored
Normal file
17
externals/boost/libs/atomic/config/has_sse41.cpp
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright Andrey Semashev 2020.
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <smmintrin.h>
|
||||
|
||||
int main(int, char*[])
|
||||
{
|
||||
__m128i mm = _mm_setzero_si128();
|
||||
mm = _mm_cmpeq_epi64(mm, mm);
|
||||
mm = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(mm), _mm_castsi128_ps(mm), _MM_SHUFFLE(2, 0, 2, 0)));
|
||||
mm = _mm_packs_epi32(mm, mm);
|
||||
return _mm_movemask_epi8(mm);
|
||||
}
|
||||
33
externals/boost/libs/atomic/config/has_synchronization_lib.cpp
vendored
Normal file
33
externals/boost/libs/atomic/config/has_synchronization_lib.cpp
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* Copyright (c) 2020 Andrey Semashev
|
||||
*/
|
||||
|
||||
#define BOOST_USE_WINAPI_VERSION 0x0602
|
||||
|
||||
// Include Boost.Predef first so that windows.h is guaranteed to be not included
|
||||
#include <boost/predef/os/windows.h>
|
||||
#include <boost/predef/os/cygwin.h>
|
||||
#if !BOOST_OS_WINDOWS && !BOOST_OS_CYGWIN
|
||||
#error "This config test is for Windows only"
|
||||
#endif
|
||||
|
||||
#include <boost/winapi/config.hpp>
|
||||
#include <boost/predef/platform.h>
|
||||
#if !(BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN8 && (BOOST_WINAPI_PARTITION_APP || BOOST_WINAPI_PARTITION_SYSTEM))
|
||||
#error "No WaitOnAddress API"
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/winapi/basic_types.hpp>
|
||||
#include <boost/winapi/wait_on_address.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned int n = 0u, compare = 0u;
|
||||
boost::winapi::WaitOnAddress(&n, &compare, sizeof(n), 0);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user