6 #ifndef METALL_UTILITY_MUTEX_HPP
7 #define METALL_UTILITY_MUTEX_HPP
24 template <
int num_banks>
25 inline std::unique_lock<std::mutex>
mutex_lock(
const std::size_t index) {
26 static std::mutex mutexes[num_banks];
27 assert(index < num_banks);
28 return std::unique_lock<std::mutex>(mutexes[index]);