<div dir="ltr">Hi <span style="color:rgb(17,17,17);font-family:-apple-system,Roboto,SegoeUI,"Segoe UI","Helvetica Neue",Helvetica,"Microsoft YaHei","Meiryo UI",Meiryo,"Arial Unicode MS",sans-serif;font-size:16px;background-color:rgb(247,247,247)">Paul Sandoz,
I am Master student.
I was use Vector API and Java.util.BitSet on Project.
there are have big trouble. Vector API no support BitSet_Vector</span><div><span style="color:rgb(17,17,17);font-family:-apple-system,Roboto,SegoeUI,"Segoe UI","Helvetica Neue",Helvetica,"Microsoft YaHei","Meiryo UI",Meiryo,"Arial Unicode MS",sans-serif;font-size:16px;background-color:rgb(247,247,247)">every time, I must be transfer BitSet.toByteArray()</span></div><div><br>in this case, because BitSet no support Vector API<br>I need to do something unproductive,</div><div><br>var aBytes = (BitSet) bs1.toByteArray();<br>var bBytes = (BitSet) bs2.toByteArray();<br>byte[] c = new byte[bs1.getByteArray().length];<br>final VectorSpecies<Byte> SPECIES = ByteVector.SPECIES_MAX;<br><br>for (int k = 0; k < aBytes.length; k += SPECIES.length()) {<br> var m = SPECIES.indexInRange(k, aBytes.length);<br> va = ByteVector.fromArray(SPECIES, aBytes, k, m);<br> vb = ByteVector.fromArray(SPECIES, bBytes, k, m);<br> vc = va.and(vb);<br> vc.intoArray(c, k, m);<br>}<br>byte[] newC = c.clone();<br>BitSet temp = BitSet.valueOf(newC);<br><br>================================================================<br>var aBytes = (BitSet) bs1;<br>var aByteClone = (BitSet) aBytes.clone();<br>var bBytes = (BitSet) bs2;<br>var ceqAandB = (BitSet) bBytes.clone();<br>CeqAandB.and(aByteClone);<br></div><div>================================================================</div><div>If I use the following code, it is faster than using AVX-512 Vectory API</div><div>Could you have any suggestion for me?<br><br>Best regard,<br><br>Latch Wu</div><div><span style="color:rgb(17,17,17);font-family:-apple-system,Roboto,SegoeUI,"Segoe UI","Helvetica Neue",Helvetica,"Microsoft YaHei","Meiryo UI",Meiryo,"Arial Unicode MS",sans-serif;font-size:16px;background-color:rgb(247,247,247)">
<br></span></div></div>