[flang-commits] [flang] [llvm] [openmp] [OpenMP] [Flang] Add Fortran integer(kind=8) overloads for omp_lib APIs (PR #221451)

via flang-commits flang-commits at lists.llvm.org
Fri Sep 11 00:55:35 PDT 2026


================
@@ -1127,6 +1229,20 @@ KMP_EXPAND_NAME(FTN_GET_PARTITION_PLACE_NUMS)(int *place_nums) {
 #endif
 }
 
+void FTN_STDCALL FTN_GET_PARTITION_PLACE_NUMS_8(kmp_int64 *place_nums) {
+  int n = KMP_EXPAND_NAME(FTN_GET_PARTITION_NUM_PLACES)();
+  int *place_nums32;
+  if (n <= 0)
+    return;
+  place_nums32 = (int *)KMP_INTERNAL_MALLOC(sizeof(int) * n);
+  if (place_nums32 == NULL)
+    return;
+  KMP_EXPAND_NAME(FTN_GET_PARTITION_PLACE_NUMS)(place_nums32);
+  for (int i = 0; i < n; ++i)
----------------
shivaramaarao wrote:

@Saieiei thanks for the comments. There is no easy way to call the omp_get_partition_place_nums() from omp_get_partition_place_nums_8() function and I have addressed the issue by duplicating the code as in omp_get_partition_place_nums function. please check.

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


More information about the flang-commits mailing list