[PROPOSAL-DRAFT] Add `FiniteBits(count{Leading,Trailing}Zeros)`
ClosedPublic

Authored by hvr on Aug 14 2014, 5:37 AM.

Details

Summary

This exposes the newly added CLZ/CTZ primops from
e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re Trac #9340)
via two new methods countLeadingZeros and countTrailingZeros
in the Data.Bits.FiniteBits class.

TODO: Unit-tests, Propose on libraries@, Bike-shedding

Test Plan

compiles and seems to work; unit-tests pending

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Lint Skipped
Unit
Unit Tests Skipped
hvr updated this revision to Diff 358.Aug 14 2014, 5:37 AM
hvr retitled this revision from to [PROPOSAL-DRAFT] Add `FiniteBits(count{Leading,Trailing}Zeros)`.
hvr updated this object.
hvr edited the test plan for this revision. (Show Details)
hvr added reviewers: ekmett, tibbe.
hvr updated the Trac tickets for this revision.
tibbe accepted this revision.Aug 14 2014, 10:02 AM
tibbe edited edge metadata.
austin accepted this revision.Aug 14 2014, 10:15 AM
austin edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Aug 14 2014, 10:15 AM
hvr updated this revision to Diff 462.Aug 31 2014, 8:47 AM
hvr edited edge metadata.

add testcase for testsuite

hvr closed this revision.Aug 31 2014, 9:27 AM
hvr updated this revision to Diff 463.

Closed by commit rGHCa8a969ae7a05 (authored by @hvr).

hvr updated the Trac tickets for this revision.Aug 31 2014, 11:13 AM