Skip to content
Snippets Groups Projects

Update to allow Alignment to run multithreaded

Merged Wouter Hulsbergen requested to merge updatemutexlockingstrategy_June2022 into master
17 files
+ 1745
1378
Compare changes
  • Side-by-side
  • Inline
Files
17
@@ -22,14 +22,14 @@ namespace LHCb::Alignment {
template <typename T>
std::ofstream& operator<<( std::ofstream& file, const T& object ) {
// printf("Trying to write object with size: %u\n",sizeof( object )) ;
//static_assert( std::is_trivially_copyable_v<T> );
// static_assert( std::is_trivially_copyable_v<T> );
file.write( reinterpret_cast<const char*>( &object ), sizeof( object ) );
return file;
}
template <typename T>
std::ifstream& operator>>( std::ifstream& file, T& object ) {
// printf("Trying to read object with size: %u\n",sizeof( object )) ;
//static_assert( std::is_trivially_copyable_v<T> );
// static_assert( std::is_trivially_copyable_v<T> );
file.read( reinterpret_cast<char*>( &object ), sizeof( object ) );
return file;
}
@@ -40,7 +40,7 @@ namespace LHCb::Alignment {
size_t n = amap.size();
// printf("Trying to write map with size: %d\n",int(n)) ;
file << n;
for ( const auto& [f,s] : amap ) file << f << s;
for ( const auto& [f, s] : amap ) file << f << s;
return file;
}
template <typename Key, typename T, typename Compare, typename Allocator>
Loading