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

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Set of header files for Ryu floating-point stuff in src/common/
Date: 2019-09-09 14:29:36
Message-ID: 8736h5eepr.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Michael" == Michael Paquier <michael(at)paquier(dot)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)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera from 2ndQuadrant 2019-09-09 14:53:35 Re: Hypothetical indexes using BRIN broken since pg10
Previous Message Paul Guo 2019-09-09 14:18:49 Re: Two pg_rewind patches (auto generate recovery conf and ensure clean shutdown)