Added functions those implement "atomic compare".
Though clang does not use library interfaces to implement OpenMP atomics,
the functions added for consistency.
Also added missed functions for 80-bit floating min/max atomics.
Differential D110109
[OpenMP] libomp: add atomic functions for new OpenMP 5.1 atomics. AndreyChurbanov on Sep 20 2021, 2:51 PM. Authored by
Details Added functions those implement "atomic compare". Also added missed functions for 80-bit floating min/max atomics.
Diff Detail
Event TimelineComment Actions Is this patch only applicable to KMP_ARCH_X86 || KMP_ARCH_X86_64 arch? The newly added test cases fail on non-X86 platform due to undefined symbols. The __kmpc_atomic_*_cas_* prototypes got preprocessed out inside the extern "C" hence the names are mangled. Comment Actions Why are the types in __kmpc_atomic_val_4_cas_cpt different from the types in __kmpc_atomic_val_4_cas? I think, all the functions should use fixed-size integer to respect the width suggested by the name of the function. Comment Actions Thanks for comment. The implementation is indeed supposed to be applicable to KMP_ARCH_X86 || KMP_ARCH_X86_64 only. Comment Actions Sorry, Joachim, I haven't got your comment. Both functions deal with kmp_int32 that is 4 bytes. Or am I missing something? Comment Actions @AndreyChurbanov There is one more issue. kmp_atomic_float10_max_min.c specifies -mlong-double-80 but some platforms (e.g. Power) do not support such option. Comment Actions Thanks for reporting. |