[Openmp-dev] [RFC][PATCH] Support for third-party memory allocation libraries
Jeff Hammond via Openmp-dev
openmp-dev at lists.llvm.org
Thu Jul 23 09:11:14 PDT 2020
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
>
--
Jeff Hammond
jeff.science at gmail.com
http://jeffhammond.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20200723/f0085669/attachment.html>
More information about the Openmp-dev
mailing list