<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 18 Dec 2019, at 15:02, Doerfert, Johannes wrote:</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">On 12/18, John McCall wrote:</p>
<blockquote style="border-left:2px solid #777; color:#999; margin:0 0 5px; padding-left:5px; border-left-color:#999"><p dir="auto">On 18 Dec 2019, at 14:25, Doerfert, Johannes wrote:</p>
<blockquote style="border-left:2px solid #777; color:#BBB; margin:0 0 5px; padding-left:5px; border-left-color:#BBB"><p dir="auto">On 12/18, John McCall wrote:</p>
<blockquote style="border-left:2px solid #777; color:#BBB; margin:0 0 5px; padding-left:5px; border-left-color:#BBB"><p dir="auto">On 18 Dec 2019, at 11:16, Doerfert, Johannes wrote:</p>
<blockquote style="border-left:2px solid #777; color:#BBB; margin:0 0 5px; padding-left:5px; border-left-color:#BBB"><p dir="auto">Is there a good reason to make 5.1-type variants different from<br>
multi-versions (as we have them)? They do not depend on the lexical call<br>
context but only on the compilation parameters.</p>
</blockquote><p dir="auto">Are multi-versions yet another feature? Do they interact with this one?</p>
</blockquote><p dir="auto">In 5.1, `begin/end declare variant` multi-version a function basically<br>
the same way as `__attribute__((target(...)))` does. The condition can<br>
be more than only a target though. (I mispoke earlier, it can include<br>
call site context information). So we have multiple versions of a<br>
function, let's say "sin", and depending on the compilation target,<br>
e.g., are we compiling for nvptx or not, ans call site context, e.g.,<br>
are we syntacitally inside a parallel region, we pick on of them. The<br>
prototype for this reuses almost all of the multi-version code that<br>
enables the target attribute as it seemed to be the natural fit.</p>
</blockquote><p dir="auto">I see. And that’s still totally statically selected at use time, right?</p>
</blockquote><p dir="auto">Yes, as of OpenMP TR8 (Nov this year). But (to me) it is fairly certain<br>
we'll also get an dynamic dispatch version too, maybe even this year (for<br>
OpenMP 5.1).</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">A dynamic version of <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">__attribute__((target))</code>, or of variants, or both?</p>
<p dir="auto">John.</p>
</div>
</div>
</body>
</html>