fix TBB ordering issue
parent
8dcde7bc58
commit
d57e5d5c45
|
|
@ -393,7 +393,14 @@ namespace gtsam {
|
|||
ss << " </thead>\n <tbody>\n";
|
||||
|
||||
// Print out all rows.
|
||||
#ifdef GTSAM_USE_TBB
|
||||
// TBB uses un-ordered map, so inefficiently order them:
|
||||
std::map<Key,Vector> ordered;
|
||||
for (const auto& kv : *this) ordered.emplace(kv);
|
||||
for (const auto& kv : ordered) {
|
||||
#else
|
||||
for (const auto& kv : *this) {
|
||||
#endif
|
||||
ss << " <tr>";
|
||||
ss << "<th>" << keyFormatter(kv.first) << "</th><td>"
|
||||
<< kv.second.transpose() << "</td>";
|
||||
|
|
|
|||
|
|
@ -272,6 +272,7 @@ TEST(VectorValues, html) {
|
|||
"</table>\n"
|
||||
"</div>";
|
||||
string actual = vv.html();
|
||||
cout << actual << endl;
|
||||
EXPECT(actual == expected);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue