<div dir="ltr">Is it the style of LLVM to add a source file "kmp_no_<optional feature>" that contains an empty implementation?<div><br></div><div>It makes more sense to me to have one implementation file and conditionally compile the implementation according to need.</div><div><br></div><div>Jeff<br><div><br></div><div><br></div><div>+ if(${LIBOMP_USE_SICM})<br>+ libomp_append(LIBOMP_CXXFILES thirdparty/sicm/kmp_sicm.cpp)<br>+ else()<br>+ libomp_append(LIBOMP_CXXFILES thirdparty/sicm/kmp_no_sicm.cpp)<br>+ endif()<br></div><div><br></div><div><br></div><div>diff --git a/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp b/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp<br>new file mode 100644<br>index 00000000000..6dc034582e6<br>--- /dev/null<br>+++ b/openmp/runtime/src/thirdparty/sicm/kmp_no_sicm.cpp<br>@@ -0,0 +1,5 @@<br>+void __kmp_init_sicm() {<br>+}<br>+<br>+void __kmp_fini_sicm() {<br>+}<br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jul 23, 2020 at 8:24 AM Ionkov, Latchesar Alexandrov via Openmp-dev <<a href="mailto:openmp-dev@lists.llvm.org">openmp-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Right now, openmp supports only memkind and it is hard to extend it to support other memory allocation libraries.<br>
<br>
The attached patch refactors the memory allocation code to make it easier to add other libraries, and adds support for SICM (<a href="https://github.com/lanl/SICM" rel="noreferrer" target="_blank">https://github.com/lanl/SICM</a>) as an example.<br>
<br>
Any comments and suggestions on how to improve the patch are welcome.<br>
<br>
Thanks,<br>
Lucho<br>
<br>
_______________________________________________<br>
Openmp-dev mailing list<br>
<a href="mailto:Openmp-dev@lists.llvm.org" target="_blank">Openmp-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a></div>