Skip to content

Commit 7938c6f

Browse files
committed
fix windows build regression
1 parent f3c9a98 commit 7938c6f

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

Vectorisation/VecX/vec_view.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "apply_operation.h"
1717
#include "error_utils.h"
1818
#include <vector>
19+
#include <stdexcept>
1920

2021

2122
template <typename INS_VEC>

accumulateExample/accumulate_example.cpp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,28 +1530,22 @@ void doCountIf()
15301530

15311531
auto v1 = getRandomShuffledVector(VEC_SZ);
15321532
auto C = v1;
1533+
1534+
volatile long resStl = 0;
15331535

1534-
#ifdef __clang__
1535-
volatile __int64_t resStl = 0;// .0;
1536-
#elif __GNUC__
1537-
volatile __int64_t resStl = 0;// .0;
1538-
#elif _MSC_VER
1539-
volatile __int64 resStl = 0;// .0;
1540-
#endif
1541-
15421536
double halfSize = VEC_SZ * 0.5;
15431537
auto isOverHalf= [&](auto x) { return x > halfSize; };
15441538

15451539
for (long l = 0; l < 100; l++)
15461540
{
1547-
resStl = std::count_if(begin(v1), end(v1), isOverHalf);
1541+
resStl = static_cast< long>( std::count_if(begin(v1), end(v1), isOverHalf) );
15481542
}
15491543

15501544

15511545
{ TimerGuard timer(time);
15521546
for (long l = 0; l < TEST_LOOP_SZ; l++)
15531547
{
1554-
resStl = std::count_if(begin(v1), end(v1), isOverHalf);
1548+
resStl = static_cast<long>(std::count_if(begin(v1), end(v1), isOverHalf));
15551549
}
15561550
}
15571551

0 commit comments

Comments
 (0)