Ran clang-format across all files

This commit is contained in:
Pedro Pinto committed 2020-12-30 17:11:18 -05:00
1 parent a27321df2e
commit 8f21a77150
1123 files changed
+159414 -162346

No files matched your search

+13 -12
View File
@@ -20,8 +20,8 @@ config::ThreadGroupCfg get_thread_cfg(std::string const &name) {
if (boost::regex_match(name, rx))
return cfg;
}
bts_assert_msg(false,
fmt::format("No configuration found for thread {}", name));
bts_assert_msg(
false, fmt::format("No configuration found for thread {}", name));
}
std::vector<uint32_t> get_affinity(std::string const &name) {
@@ -31,7 +31,8 @@ std::vector<uint32_t> get_affinity(std::string const &name) {
if (cfg.exclude()) {
auto total_cpus = sysconf(_SC_NPROCESSORS_ONLN);
for (int i = 0; i < total_cpus; i++)
if (std::find(cfg.core().begin(), cfg.core().end(), i) == cfg.core().end())
if (std::find(cfg.core().begin(), cfg.core().end(), i) ==
cfg.core().end())
result.push_back(i);
} else {
for (auto const &core : cfg.core())
@@ -42,8 +43,8 @@ std::vector<uint32_t> get_affinity(std::string const &name) {
}
#ifndef WIN32
void configure_thread(std::string const &name,
config::ThreadGroupCfg const &cfg, pthread_t t) {
void configure_thread(
std::string const &name, config::ThreadGroupCfg const &cfg, pthread_t t) {
if (cfg.core().size()) {
cpu_set_t cpuset;
CPU_ZERO(&cpuset);
@@ -77,16 +78,16 @@ void configure_current_thread(std::string const &name) {
os::set_thread_name(name);
}
void configure_current_thread(std::string const &name,
config::ThreadGroupCfg const &cfg) {
void configure_current_thread(
std::string const &name, config::ThreadGroupCfg const &cfg) {
#ifndef WIN32
configure_thread(name, cfg, pthread_self());
#endif
os::set_thread_name(name);
}
std::thread make_thread_from_function(std::string const &name,
std::function<void()> const &c) {
std::thread make_thread_from_function(
std::string const &name, std::function<void()> const &c) {
auto result = std::thread([c, name]() {
os::set_thread_name(name);
c();
@@ -98,9 +99,9 @@ std::thread make_thread_from_function(std::string const &name,
return result;
}
std::thread make_thread_from_function(std::string const &name,
std::function<void()> const &c,
config::ThreadGroupCfg const &cfg) {
std::thread make_thread_from_function(
std::string const &name, std::function<void()> const &c,
config::ThreadGroupCfg const &cfg) {
auto result = std::thread([c, name]() {
os::set_thread_name(name);
c();