]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/context/example/v2/echosse.cpp
2 // Copyright Oliver Kowalke 2009.
3 // Distributed under the Boost Software License, Version 1.0.
4 // (See accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
11 #include <emmintrin.h>
13 #include <boost/context/all.hpp>
15 void echoSSE( int i
) {
17 xmm
= _mm_set_epi32( i
, i
+ 1, i
+ 2, i
+ 3);
19 memcpy( & v32
, & xmm
, 16);
26 boost::context::execution_context
< int > echo( boost::context::execution_context
< int > ctx
, int i
) {
31 std::tie( ctx
, i
) = ctx( 0);
36 int main( int argc
, char * argv
[]) {
37 boost::context::execution_context
< int > ctx( echo
);
38 for ( int i
= 0; i
< 10; ++i
) {
39 ctx
= std::get
< 0 >( ctx( i
) );
41 std::cout
<< "\nDone" << std::endl
;