[Openmp-dev] [RFC][PATCH] Support for third-party memory allocation libraries

Johannes Doerfert via Openmp-dev openmp-dev at lists.llvm.org
Thu Jul 23 09:12:20 PDT 2020


It is not, that is one of the things we have to address in the review :)



On 7/23/20 11:11 AM, Jeff Hammond via Openmp-dev wrote:
> Is it the style of LLVM to add a source file "kmp_no_<optional feature>"
> that contains an empty implementation?
>
> It makes more sense to me to have one implementation file and conditionally
> compile the implementation according to need.
>
> Jeff
>
>
> +  if(${LIBOMP_USE_SICM})
> +    libomp_append(LIBOMP_CXXFILES thirdparty/sicm/kmp_sicm.cpp)
> +  else()
> +    libomp_append(LIBOMP_CXXFILES thirdparty/sicm/kmp_no_sicm.cpp)
> +  endif()
>
>
> diff --git a/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp
> b/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp
> new file mode 100644
> index 00000000000..6dc034582e6
> --- /dev/null
> +++ b/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp
> @@ -0,0 +1,5 @@
> +void __kmp_init_sicm() {
> +}
> +
> +void __kmp_fini_sicm() {
> +}
>
> On Thu, Jul 23, 2020 at 8:24 AM Ionkov, Latchesar Alexandrov via Openmp-dev
> <openmp-dev at lists.llvm.org> wrote:
>
>> Hi,
>>
>> Right now, openmp supports only memkind and it is hard to extend it to
>> support other memory allocation libraries.
>>
>> The attached patch refactors the memory allocation code to make it easier
>> to add other libraries, and adds support for SICM (
>> https://github.com/lanl/SICM) as an example.
>>
>> Any comments and suggestions on how to improve the patch are welcome.
>>
>> Thanks,
>>          Lucho
>>
>> _______________________________________________
>> Openmp-dev mailing list
>> Openmp-dev at lists.llvm.org
>> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
>>
>
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list