Обсуждение: Set of header files for Ryu floating-point stuff in src/common/

Поиск
Список
Период
Сортировка

Set of header files for Ryu floating-point stuff in src/common/

От
Michael Paquier
Дата:
Hi all,
(Andrew G. in CC)

We have the following set of header files in src/common/:
digit_table.h
d2s_full_table.h
d2s_intrinsics.h
ryu_common.h

Shouldn't all these files be in src/include/common/ instead?  HEAD is
not really consistent with the common practice here.

Thanks,
--
Michael

Вложения

Re: Set of header files for Ryu floating-point stuff in src/common/

От
Andrew Gierth
Дата:
>>>>> "Michael" == Michael Paquier <michael@paquier.xyz> writes:

 Michael> Hi all,
 Michael> (Andrew G. in CC)

 Michael> We have the following set of header files in src/common/:
 Michael> digit_table.h
 Michael> d2s_full_table.h
 Michael> d2s_intrinsics.h
 Michael> ryu_common.h

 Michael> Shouldn't all these files be in src/include/common/ instead?

No.

a) They are implementation, not interface.

b) Most of them are just data tables.

c) The ones that define inline functions have some specializations (e.g.
limits on ranges or shift counts) that make it unwise to expose more
generally.

They are kept as separate files primarily because upstream had them that
way (and having the data tables out of the way makes the code more
readable). But it's explicitly not a good idea for them to be installed
anywhere or to have any additional code depending on them, since it is
conceivable that they might have to change without warning or disappear
in the event that we choose to track some upstream change (or replace
Ryu entirely).

-- 
Andrew (irc:RhodiumToad)