Skip to content

Commit a6c5ef1

Browse files
committed
PLUGINS/UCX: Fixed clang format issues.
Signed-off-by: Raul Akhmetshin <[email protected]>
1 parent 47fb17e commit a6c5ef1

File tree

4 files changed

+199
-194
lines changed

4 files changed

+199
-194
lines changed

src/plugins/ucx/config.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424

2525
namespace nixl::ucx {
2626
void
27-
config::modify (std::string_view key, std::string_view value) const {
28-
const char *env_val = std::getenv (absl::StrFormat ("UCX_%s", key.data()).c_str());
27+
config::modify(std::string_view key, std::string_view value) const {
28+
const char *env_val = std::getenv(absl::StrFormat ("UCX_%s", key.data()).c_str());
2929
if (env_val) {
3030
NIXL_DEBUG << "UCX env var has already been set: " << key << "=" << env_val;
3131
} else {
32-
modifyAlways (key, value);
32+
modifyAlways(key, value);
3333
}
3434
}
3535

3636
void
37-
config::modifyAlways (std::string_view key, std::string_view value) const {
38-
const auto status = ucp_config_modify (config_.get(), key.data(), value.data());
37+
config::modifyAlways(std::string_view key, std::string_view value) const {
38+
const auto status = ucp_config_modify(config_.get(), key.data(), value.data());
3939
if (status != UCS_OK) {
4040
NIXL_WARN << "Failed to modify UCX config: " << key << "=" << value << ": "
41-
<< ucs_status_string (status);
41+
<< ucs_status_string(status);
4242
} else {
4343
NIXL_DEBUG << "Modified UCX config: " << key << "=" << value;
4444
}
@@ -47,12 +47,10 @@ config::modifyAlways (std::string_view key, std::string_view value) const {
4747
ucp_config_t *
4848
config::readUcpConfig() {
4949
ucp_config_t *config = nullptr;
50-
const auto status = ucp_config_read (NULL, NULL, &config);
50+
const auto status = ucp_config_read(nullptr, nullptr, &config);
5151
if (status != UCS_OK) {
52-
const auto err_str =
53-
std::string ("Failed to create UCX config: ") + ucs_status_string (status);
54-
NIXL_ERROR << err_str;
55-
throw std::runtime_error (err_str);
52+
throw std::runtime_error("Failed to create UCX config: " +
53+
std::string(ucs_status_string(status)));
5654
}
5755
return config;
5856
}

src/plugins/ucx/config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,18 +37,18 @@ class config {
3737

3838
// Modify the config if it is not already set via environment variable
3939
void
40-
modify (std::string_view key, std::string_view value) const;
40+
modify(std::string_view key, std::string_view value) const;
4141

4242
// Modify the config always
4343
void
44-
modifyAlways (std::string_view key, std::string_view value) const;
44+
modifyAlways(std::string_view key, std::string_view value) const;
4545

4646
private:
4747
[[nodiscard]] static ucp_config_t *
4848
readUcpConfig();
4949

50-
const std::unique_ptr<ucp_config_t, void (*) (ucp_config_t *)> config_{readUcpConfig(),
51-
&ucp_config_release};
50+
const std::unique_ptr<ucp_config_t, void (*)(ucp_config_t *)> config_{readUcpConfig(),
51+
&ucp_config_release};
5252
};
5353
} // namespace nixl::ucx
5454

0 commit comments

Comments
 (0)