<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">Sorry if this was previously discussed. I am new to the list.</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2">With current API, it seems that if
 one want to get the lanes with highest bit set, one can use Vector::compare(LT, 0). In the backend, this seems to be translated to something like vpcmpgtb followed by vpmovmskb. However, Gather the highest bit on x86 only need a movemask operation.
<br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2"><br>
</span></div>
<div class="elementToProof">
<ul>
<li style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2">I wonder if such operations can be optimized if the given constant
 is special (such as 0)</span></li><li style="font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0);" class="elementToProof">
<span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted1 ContentPasted2">Or if we can finally have a
<code>gatherBits()</code>​ operation. I know that movemask operations are not available on platforms like aarch64, but libraries like SIMDE has given some examples on how to emulate these operations on other platforms.</span></li></ul>
<div id="Signature">
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">
<img style="width: 119.816px; height: 29px; max-width: initial;" width="119" height="29" data-outlook-trace="F:1|T:1" src="cid:825d375d-909d-4f47-b90f-c786e3c116ab"><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">
<span style="font-family: "Calibri Light", "Helvetica Light", sans-serif;">Schrodinger ZHU Yifan, Ph.D. Student</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif;">Computer Science Department, University of Rochester</span></div>
<div class="ContentPasted0"><br>
</div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"><b>Personal Email:</b></span><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"> i@zhuyi.fan</span></div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"><b>Work Email:</b></span><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"> yifanzhu@rochester.edu</span></div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"><b>Website:</b></span><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"> https://www.cs.rochester.edu/~yzhu104/Main.html</span></div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"><b>Github:</b></span><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"> SchrodingerZhu</span></div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"><b>GPG Fingerprint:</b></span><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 10pt;"> BA02CBEB8CB5D8181E9368304D2CC545A78DBCC3</span></div>
<div class="ContentPasted0"><span style="font-family: "Calibri Light", "Helvetica Light", sans-serif;"><br>
</span></div>
<img style="width: 139px; height: 29px; max-width: initial;" width="139" height="29" data-outlook-trace="F:1|T:1" src="cid:aa2cc978-4bb6-445c-aa58-573900b2a081"><br>
</div>
</div>
</div>
</div>
</body>
</html>