Re: [rust-dev] Find first set

2015-01-12 Thread Peter Marheine
You can express ffs in terms of nlz, which is available as Int::leading_zeros and appears to be implemented with LLVM intrinsics for most types. On Mon, Jan 12, 2015 at 10:17 AM, Kevin McGuire kmcg3...@gmail.com wrote: On Mon, Jan 12, 2015 at 11:12 AM, Matthew Hammer ham...@cs.umd.edu wrote: Hi

Re: [rust-dev] Find first set

2015-01-12 Thread Kevin McGuire
On Mon, Jan 12, 2015 at 11:12 AM, Matthew Hammer ham...@cs.umd.edu wrote: Hi Rust Developers, I’m in need of this bit-level operation: http://en.wikipedia.org/wiki/Find_first_set I’m happy to implement it as a loop, but it seems like many architectures support it directly, as does libc.

[rust-dev] Find first set

2015-01-12 Thread Matthew Hammer
Hi Rust Developers, I’m in need of this bit-level operation: http://en.wikipedia.org/wiki/Find_first_set http://en.wikipedia.org/wiki/Find_first_set I’m happy to implement it as a loop, but it seems like many architectures support it directly, as does libc. Does anyone know if this is