Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 May 2018 16:47:21 -0300
From:      Adhemerval Zanella <adhemerval.zanella@linaro.org>
To:        sgk@troutmask.apl.washington.edu
Cc:        Konstantin Belousov <kib@freebsd.org>, freebsd-hackers@freebsd.org, emaste@freebsd.org
Subject:   Re: Code with apache-2 on /usr/src
Message-ID:  <1c09023e-9bf5-d23a-dedc-1c4f4706bbde@linaro.org>
In-Reply-To: <20180528193506.GA76705@troutmask.apl.washington.edu>
References:  <b38baac0-f326-5d46-5afe-0981af61538f@linaro.org> <20180528190444.GE3789@kib.kiev.ua> <f9f10762-651d-d2f2-c46f-6960b9a69705@linaro.org> <20180528193506.GA76705@troutmask.apl.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help


On 28/05/2018 16:35, Steve Kargl wrote:
> On Mon, May 28, 2018 at 04:08:49PM -0300, Adhemerval Zanella wrote:
>>
>> On 28/05/2018 16:04, Konstantin Belousov wrote:
>>> On Mon, May 28, 2018 at 03:33:47PM -0300, Adhemerval Zanella wrote:
>>>> Hi all,
>>>>
>>>> I am evaluating adding the ARM optimized math routines [1] on FreeBSD msum
>>>> library and I would like to check which the policy regarding licensing on
>>>> /usr/src code.  The optimized math code is licensed on Apache-2 and afaik
>>>> it should be compatible with FreeBSD BDS license, is there anything
>>>> impending to use the code as-is on msum? Or do I need to adjust and check
>>>> with author if the idea is re-license?
>>>>
>>>> [1] https://github.com/ARM-software/optimized-routines
>>>
>>> Are you asking only about the license's compatibility, or is you intent
>>> to contribute the ARM libm code to the FreeBSD project ?
>>>
>>
>> My intention is to contribute the ARM libm code to the FreeBSD msum library.
> 
> The above URL seems to contain only single precision code,
> e.g., sinf(x).  What benefit does this code have over the
> current implementations of these functions?  Doesn't ARM
> support at least a double precision type? 

Yes, the github repository only contains single precision implementation and
at the moment my idea is to contribute with expf, powf, logf, expf2, and
log2f.  All these implementation are faster than current FreeBSD ones (I
plan to dig into with more details in patch proposal).  

> Why have an
> algorithms for single precision that differ from the 
> algorithms at higher precision?
> 

Are you asking why use an implementation for single precision and another
for double and/or long double (if the case) or why to use a different
mathematical method for each one?  For later, my understanding is exactly
precision requires different mathematical analysis for the latency and
error tradeoff.  I do not have much experience on msum implementation for
double precision, neither I experimented used them for double precision
so I can' t really tell why it can' t be used for double precision as 
well (my wild guess is these float implementation were not tuned for
double precision regarding error bounds).

As a side note, the same implementations were recent pushed on GLIBC [1]
and GLIBC also used similar implementation from Sun.

[1] https://www.gnu.org/software/libc/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1c09023e-9bf5-d23a-dedc-1c4f4706bbde>