On Thu, Oct 15, 2009 at 12:50:08AM +0200, Andreas Sandberg wrote:
[...]

> Another thing I noticed, ufraw_shave_hotpixels uses 'omp atomic' to
> update the hot pixel count. Atomic instructions are generally expensive.

Depends on the alternative they're compared with. The CPU will not exactly
choke on, say, executing it 100 times total (the hot pixel count shouldn't
be that high). 100 million times would be different.

A critical section for example would be way more expensive because it
involves the kernel scheduler on the slow path.

Atomic is good enough so I didn't investigate it any further.

> As far as I can tell omp reduction construction would work fine instead.

A reduction is slightly more optimal but the difference would be
unmeasurably small in this case.

-- 
Frank

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
ufraw-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ufraw-devel

Reply via email to