[Openmp-commits] [openmp] [openmp] Use core_siblings_list if physical_package_id not available (PR #111831)

via Openmp-commits openmp-commits at lists.llvm.org
Thu Oct 10 06:00:59 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff ced15cd418d96fc3d078e687bdcc5875656c71f6 fce625888fc87d6eb572e4cba39ef7cc72fef466 --extensions c,cpp -- openmp/runtime/src/kmp_affinity.cpp openmp/runtime/test/affinity/kmp-hw-subset.c
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/openmp/runtime/src/kmp_affinity.cpp b/openmp/runtime/src/kmp_affinity.cpp
index 9074a00c0d..099fe203e9 100644
--- a/openmp/runtime/src/kmp_affinity.cpp
+++ b/openmp/runtime/src/kmp_affinity.cpp
@@ -3182,10 +3182,9 @@ static inline const char *__kmp_cpuinfo_get_envvar() {
 static bool __kmp_package_id_from_core_sibling_list(unsigned **threadInfo,
                                                     unsigned idx) {
   char path[256];
-  KMP_SNPRINTF(
-      path, sizeof(path),
-      "/sys/devices/system/cpu/cpu%u/topology/core_siblings_list",
-      threadInfo[idx][osIdIndex]);
+  KMP_SNPRINTF(path, sizeof(path),
+               "/sys/devices/system/cpu/cpu%u/topology/core_siblings_list",
+               threadInfo[idx][osIdIndex]);
   kmp_affin_mask_t *siblings = __kmp_parse_cpu_list(path);
   for (unsigned i = 0; i < __kmp_xproc; ++i) {
     if (!KMP_CPU_ISSET(i, siblings))

``````````

</details>


https://github.com/llvm/llvm-project/pull/111831


More information about the Openmp-commits mailing list