From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.68.93.228 with SMTP id cx4mr19285072pbb.9.1431778004825; Sat, 16 May 2015 05:06:44 -0700 (PDT) X-Received: by 10.140.84.202 with SMTP id l68mr227040qgd.5.1431778004780; Sat, 16 May 2015 05:06:44 -0700 (PDT) Path: buffer2.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!j8no2612384igd.0!news-out.google.com!k20ni19943qgd.0!nntp.google.com!z60no1016570qgd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 16 May 2015 05:06:44 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=87.91.37.131; posting-account=hya6vwoAAADTA0O27Aq3u6Su3lQKpSMz NNTP-Posting-Host: 87.91.37.131 References: <62605fe5-6ecf-4750-b13c-24bce65e3439@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <56f60f78-e4a2-4c6d-975a-4542972eb1e9@googlegroups.com> Subject: Re: Efficient Bit Vector Manipulation. From: vincent.diemunsch@gmail.com Injection-Date: Sat, 16 May 2015 12:06:44 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:193201 Date: 2015-05-16T05:06:44-07:00 List-Id: Le vendredi 15 mai 2015 18:58:15 UTC+2, Jeffrey R. Carter a =E9crit=A0: Thank you Jeffrey for your response, > Given your need to extract sequences of bits as integers, I'd say using a= n > Unsigned_* type from Interfaces would probably be best. This also has the > advantage of being endian independent. Yes, I'll do that. >=20 > Finding the most-significant 1 bit can be done with a binary search. Shif= ting > and masking out the B and E values is then fairly simple. It is not as simple as I hoped ! But ok, it is not difficult. Just a bit bo= ring and prone to errors. Kind regards, Vincent =20