Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-19 Thread Crt Mori
On 19 December 2017 at 14:25, Peter Zijlstra wrote: > On Tue, Dec 19, 2017 at 10:31:18AM +0100, Crt Mori wrote: >> IIO kernel does not have the recent version in, so thanks for heads > > IIO? > Industrial Input / Output Subsytem tree >> up. It does not change much for my function. > > The commen

Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-19 Thread Peter Zijlstra
On Tue, Dec 19, 2017 at 10:31:18AM +0100, Crt Mori wrote: > IIO kernel does not have the recent version in, so thanks for heads IIO? > up. It does not change much for my function. The comment says: * Computes: floor(sqrt(x)) floor(sqrt(2^64-1)) == 2^32-1

Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-19 Thread Crt Mori
On 18 December 2017 at 17:24, Joe Perches wrote: > On Mon, 2017-12-18 at 16:05 +0100, Crt Mori wrote: >> There is no option to perform 64bit integer sqrt on 32bit platform. >> Added stronger typed int_sqrt64 enables the 64bit calculations to >> be performed on 32bit platforms. Although int_sqrt()

Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-19 Thread Crt Mori
On 18 December 2017 at 17:44, Peter Zijlstra wrote: > On Mon, Dec 18, 2017 at 04:05:44PM +0100, Crt Mori wrote: >> There is no option to perform 64bit integer sqrt on 32bit platform. >> Added stronger typed int_sqrt64 enables the 64bit calculations to >> be performed on 32bit platforms. Although i

Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-18 Thread Peter Zijlstra
On Mon, Dec 18, 2017 at 04:05:44PM +0100, Crt Mori wrote: > There is no option to perform 64bit integer sqrt on 32bit platform. > Added stronger typed int_sqrt64 enables the 64bit calculations to > be performed on 32bit platforms. Although int_sqrt() is a rough > approximation, the same algorithm i

Re: [PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-18 Thread Joe Perches
On Mon, 2017-12-18 at 16:05 +0100, Crt Mori wrote: > There is no option to perform 64bit integer sqrt on 32bit platform. > Added stronger typed int_sqrt64 enables the 64bit calculations to > be performed on 32bit platforms. Although int_sqrt() is a rough > approximation, the same algorithm is used

[PATCH v6 1/3] lib: Add strongly typed 64bit int_sqrt

2017-12-18 Thread Crt Mori
There is no option to perform 64bit integer sqrt on 32bit platform. Added stronger typed int_sqrt64 enables the 64bit calculations to be performed on 32bit platforms. Although int_sqrt() is a rough approximation, the same algorithm is used in int_sqrt64() as good enough on 32bit platform. Signed-o