<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p>Hi Martin,<br>
</p>
<div class="moz-cite-prefix">On 23/12/2022 17:20, Martin Pernollet
wrote:<br>
</div>
<blockquote type="cite" cite="mid:2LW-wXhOpJvTdPl-Xf_PbxptkED52CmZbZlnTvIkuPE_ZjsK856uktmsoysSJKtKN1MgcE6_GpGcYEhs92t9COeSUu9olgSuBKvpV1MBxE8=@protonmail.com">
<div style="font-family: Arial; font-size: 14px;">Hi,</div>
<div style="font-family: Arial; font-size: 14px;"><br>
</div>
<div style="font-family: Arial; font-size: 14px;">Would anyone
suggest examples showing how to use Panama 19 instead of 17? A
couple of things have changed ( e.g. how to use the new
<pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'JetBrains Mono',monospace;font-size:9,8pt"><span style="color:#9876aa">locator</span>.allocateArray(<span style="color:#cc7832">new </span>ValueLayout.OfDouble(</pre>
, and deal with all other datatypes, strings, etc).</div>
</blockquote>
The general idea is to either use one of the layout constants in the
ValueLayout class, such as JAVA_DOUBLE. Or use a layout generated by
jextract for a specific type. For strings the type would be a
pointer, so the ValueLayout.ADDRESS layout or the C_POINTER layout
generated by jextract can be used for instance.<br>
<blockquote type="cite" cite="mid:2LW-wXhOpJvTdPl-Xf_PbxptkED52CmZbZlnTvIkuPE_ZjsK856uktmsoysSJKtKN1MgcE6_GpGcYEhs92t9COeSUu9olgSuBKvpV1MBxE8=@protonmail.com">
<div style="font-family: Arial; font-size: 14px;"><br>
</div>
<div style="font-family: Arial; font-size: 14px;">One additional
question : when will ARM be supported to run panama on Apple
M1? <br>
</div>
</blockquote>
<p>MacOs/AArch64 (i.e ARM) has been supported since Java 17 [1]<br>
</p>
<p>Jorn</p>
<p>[1]: <a class="moz-txt-link-freetext" href="https://github.com/openjdk/jdk/pull/3617">https://github.com/openjdk/jdk/pull/3617</a><br>
</p>
<blockquote type="cite" cite="mid:2LW-wXhOpJvTdPl-Xf_PbxptkED52CmZbZlnTvIkuPE_ZjsK856uktmsoysSJKtKN1MgcE6_GpGcYEhs92t9COeSUu9olgSuBKvpV1MBxE8=@protonmail.com">
<div style="font-family: Arial; font-size: 14px;"><br>
</div>
<div class="protonmail_signature_block" style="font-family: Arial;
font-size: 14px;">
<div class="protonmail_signature_block-user
protonmail_signature_block-empty"> </div>
<div class="protonmail_signature_block-proton">Regards,</div>
<div class="protonmail_signature_block-proton"><br>
</div>
<div class="protonmail_signature_block-proton">Martin</div>
</div>
</blockquote>
</body>
</html>