Hello there,<div><br></div><div><div>I was wondering what the recommendations would be for getting CAS on [mutable] vector elements?</div><div><br></div><div>I thought that as a first step I might create an a library that does the trick only for unboxed vectors, by using bits-atomic (i.e. FFI + GCC intrinsics).</div>
<div><br></div><div>Roman Leshchinskiy recommended against depending on GCC. <span style>He thought, therefore, that not only boxed arrays but unboxed ones would need an extra PrimOp to be handled properly:</span></div>
<br class="Apple-interchange-newline">
<div><span style>> You can't rely on gcc extensions because code is usually compiled with the</span><br style><span style>> native code generator nowadays and doesn't go through gcc. The dependency</span><br style>
<span style>> on gcc will (hopefully) be dropped eventually anyway. So you'd probably</span><br style><span style>> also want primops for unboxed arrrays and Addr#.</span></div></div><div><span style><br></span></div>
<div><span style>Any advice?</span></div><div><span style><br></span></div><div><span style>Thanks,</span></div><div><font color="#222222" face="arial, sans-serif"> -Ryan</font></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div>