Remove namspace handling code for std::tuple and std::get

gtest defines aliases in ::testing which will do the right thing.

Change-Id: Ic8c803cbda377602d32a1096f57f0a9b3f8bdb0c
This commit is contained in:
Sameer Agarwal
2017-05-30 11:29:59 -07:00
parent 96e908d796
commit 07c35a1e8c
+7 -15
View File
@@ -148,23 +148,15 @@ void SparseCholeskySolverUnitTest(
<< eigen_lhs;
}
#ifdef CERES_USE_CXX11
using std::tuple;
using std::get;
#else
using std::tr1::tuple;
using std::tr1::get;
#endif
typedef tuple<SparseLinearAlgebraLibraryType, OrderingType, bool>
typedef ::testing::tuple<SparseLinearAlgebraLibraryType, OrderingType, bool>
Param;
std::string ParamInfoToString(testing::TestParamInfo<Param> info) {
Param param = info.param;
std::stringstream ss;
ss << SparseLinearAlgebraLibraryTypeToString(get<0>(param)) << "_"
<< (get<1>(param) == AMD ? "AMD" : "NATURAL") << "_"
<< (get<2>(param) ? "UseBlockStructure" : "NoBlockStructure");
ss << SparseLinearAlgebraLibraryTypeToString(::testing::get<0>(param)) << "_"
<< (::testing::get<1>(param) == AMD ? "AMD" : "NATURAL") << "_"
<< (::testing::get<2>(param) ? "UseBlockStructure" : "NoBlockStructure");
return ss.str();
}
@@ -183,9 +175,9 @@ TEST_P(SparseCholeskyTest, FactorAndSolve) {
for (int trial = 0; trial < kNumTrials; ++trial) {
const double block_density = std::max(0.1, RandDouble());
Param param = GetParam();
SparseCholeskySolverUnitTest(get<0>(param),
get<1>(param),
get<2>(param),
SparseCholeskySolverUnitTest(::testing::get<0>(param),
::testing::get<1>(param),
::testing::get<2>(param),
num_blocks,
kMinBlockSize,
kMaxBlockSize,