This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cl /Zi /std:c++latest /MD /EHsc /O2 /openmp .\openmp.cpp | |
cl /Zi /std:c++latest /MD /EHsc /O2 .\parallel_for_each_comparative.cpp | |
cl /D_HAS_AUTO_PTR_ETC=1 /std:c++latest /MD /EHsc /O2 /IC:\Users\bion\Desktop\vcpkg-export-20170608-100432\installed\x86-windows\include .\hpx_for_each.cpp /link /libpath:C:\Users\bion\Desktop\vcpkg-export-20170608-100432\installed\x86-windows\lib hpx.lib hpx_init.lib boost_program_options-vc140-mt-1_64.lib boost_system-vc140-mt-1_64.lib boost_timer-vc140-mt-1_64.lib boost_date_time-vc140-mt-1_64.lib boost_thread-vc140-mt-1_64.lib | |
PS TEST WCFB01 C:\Users\bion\Desktop>.\parallel_for_each_comparative.exe | |
Testing sequential | |
A[70] is 1 | |
Sequential took 2874ms |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <hpx/hpx.hpp> | |
#include <hpx/hpx_init.hpp> | |
#include <hpx/parallel/algorithms/for_each.hpp> | |
#include <stdio.h> | |
#include <chrono> | |
#include <cstddef> | |
#include <iterator> | |
#include <vector> | |
#include "stopwatch.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// TEMPLATE FUNCTION inplace_merge WITH PRED | |
// The "usual invariants" for the inplace_merge helpers below are: | |
// [_First, _Mid) and [_Mid, _Last) are sorted | |
// _Pred(*_Mid, *_First) note: this means *_Mid is the "lowest" element | |
// _Pred(*prev(_Last), *prev(_Mid)) note: this means *prev(_Mid) is the "highest" element | |
// _Count1 == distance(_First, _Mid) | |
// _Count2 == distance(_Mid, _Last) | |
// _Count1 > 1 | |
// _Count2 > 1 | |
template<class _BidIt> inline |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// STACK TRACE FUNCTIONS | |
_VCP_STATIC_ASSERT(_STD is_same< | |
decltype(__std_async_capture_stack_trace), | |
decltype(RtlCaptureStackBackTrace) | |
>::value); | |
// THREADPOOL FUNCTIONS | |
struct _Legacy_threadpool_thunk_data | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PARALLEL FUNCTION TEMPLATE reverse | |
template<class _BidIt> | |
struct _Reverse_partition | |
{ | |
_BidIt _First; | |
_BidIt _Stop_at; | |
_BidIt _Last; | |
}; | |
template<class _BidIt, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <hpx/hpx.hpp> | |
#include <hpx/hpx_init.hpp> | |
#include <hpx/parallel/algorithms/reverse.hpp> | |
#include <algorithm> | |
#include <execution> | |
#include <functional> | |
#include <random> | |
#include <vector> | |
#include "stopwatch.hpp" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// STRUCT TEMPLATE _Static_partition_set | |
template<class _FwdIt> | |
struct _Iterator_range | |
{ // record of a partition of work | |
_FwdIt _First; | |
_FwdIt _Last; | |
explicit operator bool() const | |
{ | |
return (_First != _Last); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /******************************************************** | |
// * * | |
// * Copyright (C) Microsoft. All rights reserved. * | |
// * * | |
// ********************************************************/ | |
namespace Runall.CLI | |
{ | |
using System; | |
using System.Runtime.InteropServices; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Function compile flags: /Ogtpy | |
; COMDAT _append_char | |
_TEXT SEGMENT | |
tv636 = -4 ; size = 4 | |
__New_ptr$1$ = 8 ; size = 4 | |
_x$ = 8 ; size = 4 | |
_append_char PROC ; COMDAT | |
; File c:\users\bion\desktop\test.cpp | |
; Line 3 | |
00000 51 push ecx |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// PARALLEL FUNCTION TEMPLATES remove AND remove_if | |
template<class _InIt, | |
class _OutIt, | |
class _Pr> | |
_OutIt _Remove_move_if_unchecked(_InIt _First, const _InIt _Last, _OutIt _Dest, _Pr _Pred) | |
{ // move omitting each element satisfying _Pred | |
for (; _First != _Last; ++_First) | |
{ | |
if (!_Pred(*_First)) | |
{ |