rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
687 stars 340 forks source link

Re: Make the unit standard value functions constexpr #1320

Closed cielavenir closed 8 months ago

cielavenir commented 9 months ago

Revert "revert constexpr change until it can be tested more" This reverts commit 3bc6152ed7a26925c0bfc34d5bf40ac751617925.

redoing https://github.com/rdiankov/openrave/pull/1293

/cc @florisatmujin


Now all my cmake MRs are merged, it is time to take a look at this again.

cielavenir commented 9 months ago
-----BEGIN PGP MESSAGE-----

hQIMAwAinXiLUbjzARAApwQHZ1c1YTx6jNACp1PT6AcyY/JmP26EmmqqvXVsaLPw
eQ+KQnF2B+3wqL8qURwUMVzVgkHNqYzAjMoak9AVW9jOLOVYd2i4YPoaZ9oj2W79
K83FpmtPD1YcWX2y9WrPirBToElKxa9dFfS+zz+cf1vg/tFFDXRyEgxFbh/Kpyhe
f5gFsfUDHrgnbJqmM+5wYYjZsRgaV0X9hSYTnUTVqQuWEWA4NyFh2ciUvsDaidry
e3awWQ2YRGIA06hrOSfbLdmjFpmgjOzNxFuijMblHOQSFH2AlNOTLHLNG/Yaa4J7
mVAYLqwwmV26t+XzWw/Br7GahtoJMFucybYAKP/KiHeuKKPu45VZXAITlIVxYCZp
5IejKW9e20x48BFWKQRtVsu25GBapcVdj73xCGMpwy+L68XzKR02KZzbFz7wEeyJ
swmJNgyo1Z5RxA2QnRKWagUE4wy7CU0/shiDG8guh4bkbZbHegmOQCw9PXujYsfD
F1/9qAK8/56RlEM2mg8A71U2wzXtoCdszsQO63PtjnPOzLScxZzNGj5LYyO09PM/
amo48GIon7MGH644RwkRGxoXWX6nrGqQfXq71vuzobsq/Lz6orEkWZtS0J7mSbGg
e8+9p7+HKtMQai+NJagtzQxlcvoQL8UA44RIAhpsF9jhjpw3U/CzTvXDjT8riszS
gQEDjesoCABc6CBE8uO1AsPT5q0xGRwFhVzPZqcNKH5s/+XHIuWuSvDYeIZZsCr5
AtYWLxeugvamX4owTCrEySMf6FkLKMEEKPlRWtx1hzeBTGcxgfIg4Fw6NuZ/dThW
TeKeg/MSQ55RYLlsQLW0/vyVo1rptRRx80Le9p5Klv+Szg==
=p+zX
-----END PGP MESSAGE-----
cielavenir commented 9 months ago

autotester looks ok

rdiankov commented 8 months ago

can you explain reason for constexpr again? thanks

rdiankov commented 8 months ago

@cielavenir ping

cielavenir commented 8 months ago

@shossjer @florisatmujin could you check? (I heard you will check it soon during lunchtime)

shossjer commented 8 months ago

@cielavenir @rdiankov when we generate the unit conversion tables for the schema profile merger, it is possible to check at build time that the hardcoded unit values in OpenRAVE match the hardcoded constants used to generate the tables but only if these functions (or something equivalent to them) are constexpr.

In order to see the full effect of this change, we also need to add back the now commented out asserts in the table generation code.

I will add that the usefulness of checking this at build time has diminished somewhat since there have been no changes to the units lately.

rdiankov commented 8 months ago

thanks