Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
rparolin committed Feb 1, 2018
2 parents b9be6af + 934bf60 commit 036fa88
Show file tree
Hide file tree
Showing 41 changed files with 4,468 additions and 1,521 deletions.
25 changes: 10 additions & 15 deletions benchmark/source/BenchmarkAlgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@
#include <EASTL/string.h>
#include <EASTL/random.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4350) // behavior change: X called instead of Y
#endif
EA_DISABLE_ALL_VC_WARNINGS()
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#include <list>
#include <algorithm>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()

#ifdef _MSC_VER
#pragma warning(disable: 4996) // Function call with parameters that may be unsafe
Expand Down Expand Up @@ -646,11 +641,11 @@ void BenchmarkAlgorithm2(EASTLTest_Rand& rng, EA::StdC::Stopwatch& stopwatch1, E
// Test random_shuffle
///////////////////////////////

TestRandomShuffleStd(stopwatch1, stdVectorUint64, rng);
TestRandomShuffleEa (stopwatch2, eaVectorUint64, rng);
// TestRandomShuffleStd(stopwatch1, stdVectorUint64, rng);
// TestRandomShuffleEa (stopwatch2, eaVectorUint64, rng);

if(i == 1)
Benchmark::AddResult("algorithm/rand_shuffle/vector<uint64_t>", stopwatch1.GetUnits(), stopwatch1.GetElapsedTime(), stopwatch2.GetElapsedTime());
// if(i == 1)
// Benchmark::AddResult("algorithm/rand_shuffle/vector<uint64_t>", stopwatch1.GetUnits(), stopwatch1.GetElapsedTime(), stopwatch2.GetElapsedTime());



Expand Down Expand Up @@ -856,10 +851,10 @@ void BenchmarkAlgorithm5(EASTLTest_Rand& /*rng*/, EA::StdC::Stopwatch& stopwatch
if(i == 1)
Benchmark::AddResult("algorithm/fill/vector<char>/'d'", stopwatch1.GetUnits(), stopwatch1.GetElapsedTime(), stopwatch2.GetElapsedTime());

TestFillStd(stopwatch1, stdVectorChar.begin(), stdVectorChar.end(), 0);
TestFillEa (stopwatch2, eaVectorChar.begin(), eaVectorChar.end(), 0);
TestFillStd(stopwatch1, stdVectorChar.begin(), stdVectorChar.end(), 0); // Intentionally do this a second time, as we are finding
TestFillEa (stopwatch2, eaVectorChar.begin(), eaVectorChar.end(), 0); // the results are inconsistent otherwise.
TestFillStd(stopwatch1, stdVectorChar.begin(), stdVectorChar.end(), (char)0);
TestFillEa (stopwatch2, eaVectorChar.begin(), eaVectorChar.end(), (char)0);
TestFillStd(stopwatch1, stdVectorChar.begin(), stdVectorChar.end(), (char)0); // Intentionally do this a second time, as we are finding
TestFillEa (stopwatch2, eaVectorChar.begin(), eaVectorChar.end(), (char)0); // the results are inconsistent otherwise.

if(i == 1)
Benchmark::AddResult("algorithm/fill/vector<char>/0", stopwatch1.GetUnits(), stopwatch1.GetElapsedTime(), stopwatch2.GetElapsedTime());
Expand Down
10 changes: 3 additions & 7 deletions benchmark/source/BenchmarkBitset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,10 @@
#include <EAStdC/EAStopwatch.h>
#include <EASTL/bitset.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4350) // behavior change: X called instead of Y
#endif

EA_DISABLE_ALL_VC_WARNINGS()
#include <bitset>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()


using namespace EA;
Expand Down
10 changes: 2 additions & 8 deletions benchmark/source/BenchmarkHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,7 @@
#endif


#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4555) // expression has no effect; expected expression with side-effect
#pragma warning(disable: 4350) // behavior change: X called instead of Y
#endif
EA_DISABLE_ALL_VC_WARNINGS()
#if STD_HASH_SUPPORTED
#if (defined(EA_COMPILER_GNUC) || defined(EA_COMPILER_CLANG)) && (defined(_CXXCONFIG) || defined(EA_PLATFORM_UNIX) || defined(EA_PLATFORM_MINGW))
#include <ext/hash_map>
Expand All @@ -45,9 +41,7 @@
#include <string>
#include <algorithm>
#include <stdio.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()



Expand Down
10 changes: 2 additions & 8 deletions benchmark/source/BenchmarkMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@
#include <EASTL/vector.h>
#include <EASTL/algorithm.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4702) // VC++ STL headers generate this. warning C4702: unreachable code
#pragma warning(disable: 4350) // behavior change: X called instead of Y
#endif
EA_DISABLE_ALL_VC_WARNINGS()
#include <map>
#include <algorithm>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()


using namespace EA;
Expand Down
10 changes: 2 additions & 8 deletions benchmark/source/BenchmarkSet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,10 @@
#include <EASTL/vector.h>
#include <EASTL/algorithm.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4702) // VC++ STL headers generate this. warning C4702: unreachable code
#pragma warning(disable: 4350)
#endif
EA_DISABLE_ALL_VC_WARNINGS()
#include <set>
#include <algorithm>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()


using namespace EA;
Expand Down
9 changes: 2 additions & 7 deletions benchmark/source/BenchmarkString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,12 @@
#include <EASTL/string.h>
#include <EASTL/sort.h>

#ifdef _MSC_VER
#pragma warning(push, 0)
#pragma warning(disable: 4350)
#endif
EA_DISABLE_ALL_VC_WARNINGS()
#include <algorithm>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#ifdef _MSC_VER
#pragma warning(pop)
#endif
EA_RESTORE_ALL_VC_WARNINGS()


using namespace EA;
Expand Down
4 changes: 2 additions & 2 deletions benchmark/source/EASTLBenchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace Benchmark
WriteTime(result.mTime1NS, sClockTime1); // This converts an integer in nanoseconds (e.g. 23400000) to a string (e.g. "23.4 ms")
WriteTime(result.mTime2NS, sClockTime2);

EA::UnitTest::Report("%-42s | %13" PRIu64 " %s | %13" PRIu64 " %s | %10.2f%10s", result.msName.c_str(), result.mTime1, sClockTime1.c_str(), result.mTime2, sClockTime2.c_str(), fRatioPrinted, pDifference);
EA::UnitTest::Report("%-43s | %13" PRIu64 " %s | %13" PRIu64 " %s | %10.2f%10s", result.msName.c_str(), result.mTime1, sClockTime1.c_str(), result.mTime2, sClockTime2.c_str(), fRatioPrinted, pDifference);

if(result.msNotes.length()) // If there are any notes...
EA::UnitTest::Report(" %s", result.msNotes.c_str());
Expand Down Expand Up @@ -216,7 +216,7 @@ namespace Benchmark
EA::UnitTest::Report("\n");
EA::UnitTest::Report("Values are ticks and time to complete tests; smaller values are better.\n");
EA::UnitTest::Report("\n");
EA::UnitTest::Report("%-42s%26s%26s%13s%13s\n", "Test", gEnvironment.msSTLName1.c_str(), gEnvironment.msSTLName2.c_str(), "Ratio", "Difference?");
EA::UnitTest::Report("%-43s%26s%26s%13s%13s\n", "Test", gEnvironment.msSTLName1.c_str(), gEnvironment.msSTLName2.c_str(), "Ratio", "Difference?");
EA::UnitTest::Report("---------------------------------------------------------------------------------------------------------------------\n");

eastl::string sTestTypeLast;
Expand Down
2 changes: 1 addition & 1 deletion include/EASTL/algorithm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,7 @@ namespace eastl
{
if(!predicate(*first))
{
*result = move(*first);
*result = eastl::move(*first);
++result;
}
}
Expand Down
Loading

0 comments on commit 036fa88

Please sign in to comment.