Started obj port and gave up.
This commit is contained in:
@@ -7,9 +7,8 @@
|
||||
|
||||
|
||||
assets::kitti_pose_parser::parser_context::parser_context(
|
||||
store_type& m_store,
|
||||
std::mutex& m_store_mutex
|
||||
) : m_store{ &m_store }, m_store_mutex{ &m_store_mutex }
|
||||
store_type& m_store
|
||||
) : m_store{ &m_store }
|
||||
{
|
||||
m_buffer.reserve(128);
|
||||
}
|
||||
@@ -29,10 +28,7 @@ void assets::kitti_pose_parser::parser_context::operator()(lookup_type::const_po
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
auto lock = std::lock_guard{ *m_store_mutex };
|
||||
m_store->add(id, m_buffer);
|
||||
}
|
||||
m_store->insert(id, m_buffer);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,13 +51,11 @@ std::error_code assets::kitti_pose_parser::parse(
|
||||
m_path_buffer.clear();
|
||||
lookups.pose_lists.by_extension(".glsl", m_path_buffer);
|
||||
|
||||
auto store_mutex = std::mutex{};
|
||||
|
||||
std::for_each(
|
||||
std::execution::parallel_unsequenced_policy{},
|
||||
m_path_buffer.begin(),
|
||||
m_path_buffer.end(),
|
||||
parser_context{ store, store_mutex }
|
||||
parser_context{ store }
|
||||
);
|
||||
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user