Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-17 Thread Douglas Geiger
On Thu, Sep 17, 2015 at 1:56 AM, West, Nathan wrote: > > >> I've nagged people about this before, but I'd like to make this an >> official thing: Put this into the VOLK docs (i.e. state in the contract >> that in- and output buffers may be the same) and then include that in >> the unit tests, so w

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread West, Nathan
On Wed, Sep 16, 2015 at 8:20 PM, Martin Braun wrote: > On 16.09.2015 13:29, West, Nathan wrote: > > There is a volk_32f_s32f_multiply_32f. It doesn't operate in-place, but > > almost none of the VOLK kernels do. I think it's safe to give the same > > output buffer as input buffer. (I've heard tha

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread Martin Braun
On 16.09.2015 13:29, West, Nathan wrote: > There is a volk_32f_s32f_multiply_32f. It doesn't operate in-place, but > almost none of the VOLK kernels do. I think it's safe to give the same > output buffer as input buffer. (I've heard that doing stuff in-place is > noticeably better, but I've never t

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread Dennis Glatting
On Wed, 2015-09-16 at 16:29 -0400, West, Nathan wrote: > On Wed, Sep 16, 2015 at 3:58 PM, Dennis Glatting > wrote: > > > > It would also be nice to have a VOLK kernel that multiples a vector > > by a constant: > > > >void > >volk_32f_s32f_multiply( float* vecbuffer, > >

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread West, Nathan
On Wed, Sep 16, 2015 at 3:58 PM, Dennis Glatting wrote: > > > It would also be nice to have a VOLK kernel that multiples a vector by a > constant: > >void >volk_32f_s32f_multiply( float* vecbuffer, >const float scalar, >unsigned int n

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread Dennis Glatting
On Wed, 2015-09-16 at 12:49 -0400, mle...@ripnet.com wrote: > Sure, but if the flow-graph basically is decimated 10:1 by the time > it reaches the log10, improvements in log10 are going to have very > little impact. It is, I would assert, boldly and perhaps brashly, > that log10 operations almost

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread mleech
Sure, but if the flow-graph basically is decimated 10:1 by the time it reaches the log10, improvements in log10 are going to have very little impact. It is, I would assert, boldly and perhaps brashly, that log10 operations almost never need to be done at "line rate", since they are an artifice

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread Martin Braun
On 15.09.2015 20:35, Marcus D. Leech wrote: > Ordinarily, one does a log10 to convert into engineering units at the > back of, for example, a power-measurement chain. > > There's usually no reason to do that in the middle of a flow-graph, > where things can stay in linear units. That's true, but

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread West, Nathan
This is the use case I had in mind when we were working on the log2 kernel. Binary logs are the fastest log to compute (for floating point numbers) because of Marcus' explanation. I even wrote the NEON log2 proto-kernel so that the computation can be in-lined in other kernels in the future to avoid

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-16 Thread Marcus Müller
By the way, with a bit of approximation and a little acceptance for errors in corner cases, log2 of a IEEE-754 float is simply it's exponent + log2(mantissa), with the later potentially being implementable using lookup tables. Also, VOLK does have a log2, kernel, volk_32f_log2_32f Best regards, Ma

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Dennis Glatting
On Wed, 2015-09-16 at 00:32 -0400, Brian Padalino wrote: > On a side note, this is extremely impressive and I wish I knew about > it sooner: > > https://software.intel.com/sites/landingpage/IntrinsicsGuide/ > > There's a few different log10_ps (packed single) functions in there. > That's real

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Brian Padalino
On Wed, Sep 16, 2015 at 12:24 AM, Dennis Glatting wrote: > > 1) Working with VOLK to learn VOLK. > 2) Having fun with vectors. > 3) Generating power data points for plotting across a selected >set of samples. Lastly, another alternative, if you wanted to utilize what is already there in VOLK,

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Brian Padalino
On a side note, this is extremely impressive and I wish I knew about it sooner: https://software.intel.com/sites/landingpage/IntrinsicsGuide/ There's a few different log10_ps (packed single) functions in there. Brian On Wed, Sep 16, 2015 at 12:24 AM, Dennis Glatting wrote: > On Tue, 2015-09-

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Dennis Glatting
On Tue, 2015-09-15 at 23:35 -0400, Marcus D. Leech wrote: > On 09/15/2015 11:15 PM, Dennis Glatting wrote: > > With the VOLK library, is there a way to compute the log10() of > > each > > 32f in a buffer? > > > > That is: > > > > for( int i = 0; i < num; ++i ) > > buf[i] = std::log10( buf[i

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Brian Padalino
It sounded like a fun and interesting question, so apparently there is a little post from 2007 about a new implementation in C licensed under GPLv2: https://sourceware.org/ml/libc-alpha/2007-06/msg00124.html It would be interesting to compare and see if the results are beneficial even if no VOL

Re: [Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Marcus D. Leech
On 09/15/2015 11:15 PM, Dennis Glatting wrote: With the VOLK library, is there a way to compute the log10() of each 32f in a buffer? That is: for( int i = 0; i < num; ++i ) buf[i] = std::log10( buf[i]); I only see log2() in the library but don't know if there is an easy way to compute lo

[Discuss-gnuradio] VOLK: fast way to log10()?

2015-09-15 Thread Dennis Glatting
With the VOLK library, is there a way to compute the log10() of each 32f in a buffer? That is: for( int i = 0; i < num; ++i ) buf[i] = std::log10( buf[i]); I only see log2() in the library but don't know if there is an easy way to compute log10(). Thanks. __