[Openmp-commits] [PATCH] D51232: [OpenMP] Initial implementation of OMP 5.0 Memory Management routines
Jonas Hahnfeld via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Sat Aug 25 01:12:24 PDT 2018
Hahnfeld added inline comments.
================
Comment at: runtime/src/kmp_alloc.cpp:1318-1323
+ if (allocator == omp_default_mem_alloc)
+ ptr = __kmp_allocate(desc.size_a);
+ if (allocator == omp_high_bw_mem_alloc && __kmp_hbw_mem_available) {
+ KMP_DEBUG_ASSERT(p_hbw_malloc != NULL);
+ ptr = p_hbw_malloc(desc.size_a);
+ }
----------------
Does that mean we return `NULL` if `allocator == omp_high_bw_mem_alloc && !__kmp_hbw_mem_available`? Would it make sense to fallback to `omp_default_mem_alloc` in this case?
================
Comment at: runtime/tools/generate-def.pl:113-123
+### if ( not defined( $ordinal ) or $ordinal eq "DATA" ) {
+ if ( not defined( $ordinal ) ) {
runtime_error(
"Bad entry \"$entry\": ordinal number is not specified."
);
}; # if
+ if ( $ordinal ne "DATA" ) {
----------------
Can the commented lines be removed?
Repository:
rOMP OpenMP
https://reviews.llvm.org/D51232
More information about the Openmp-commits
mailing list