File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 16
16
#include " apply_operation.h"
17
17
#include " error_utils.h"
18
18
#include < vector>
19
+ #include < stdexcept>
19
20
20
21
21
22
template <typename INS_VEC>
Original file line number Diff line number Diff line change @@ -1530,28 +1530,22 @@ void doCountIf()
1530
1530
1531
1531
auto v1 = getRandomShuffledVector (VEC_SZ);
1532
1532
auto C = v1;
1533
+
1534
+ volatile long resStl = 0 ;
1533
1535
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
-
1542
1536
double halfSize = VEC_SZ * 0.5 ;
1543
1537
auto isOverHalf= [&](auto x) { return x > halfSize; };
1544
1538
1545
1539
for (long l = 0 ; l < 100 ; l++)
1546
1540
{
1547
- resStl = std::count_if (begin (v1), end (v1), isOverHalf);
1541
+ resStl = static_cast < long >( std::count_if (begin (v1), end (v1), isOverHalf) );
1548
1542
}
1549
1543
1550
1544
1551
1545
{ TimerGuard timer (time);
1552
1546
for (long l = 0 ; l < TEST_LOOP_SZ; l++)
1553
1547
{
1554
- resStl = std::count_if (begin (v1), end (v1), isOverHalf);
1548
+ resStl = static_cast < long >( std::count_if (begin (v1), end (v1), isOverHalf) );
1555
1549
}
1556
1550
}
1557
1551
You can’t perform that action at this time.
0 commit comments