Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] [OMPI svn-full] svn:open-mpi r25270
From: Rainer Keller (keller_at_[hidden])
Date: 2011-10-14 17:07:33


Hi Tim,
in fact I was trying the OR-alternative -- however, it's only a win on older
AMD Opterons (16 cycles vs. 20), but cannot beat the __builtin_clz alternative
on Intel.

Best regards,
Rainer

On Wednesday 12 October 2011 11:26:52 Tim Mattox wrote:
> All,
> If you wanted to speedup these routines for processors without
> __builtin_clz, there are a variety of variations in C to implement clz
> efficiently. See Hacker's Delight nlz (number of leading zeros):
> http://www.hackersdelight.org/HDcode/nlz.c.txt
>
> Or from my Ph.D. advisor's magic algorithm's page:
> http://aggregate.org/MAGIC/#Leading%20Zero%20Count
>
> And you can directly implement opal_next_poweroftwo()
> with this:
> http://aggregate.org/MAGIC/#Next%20Largest%20Power%20of%202
>
> The Hacker's Delight webpage (and book) are fun to read for that
> certain kind of person. :-)
> http://www.hackersdelight.org/