Boost logo

Boost Users :

Subject: [Boost-users] generalize boost macros
From: Gero Peterhoff (gero.peterhoff_at_[hidden])
Date: 2019-02-01 00:52:03


Hello,
I have some ideas for config/predef, multiprecision and others.

config/predef:
What bothers me is the inconsistent nomenclature of several macros. For
example,
integer:
 BOOST_HAS_INT128
 BOOST_NO_INT64_T
float:
 BOOST_FLOATx_C
decimal:
 ?
I think you should definitely generalize that:
BOOST_HW_TYPE_AVAILABLE:
 only if TYPE is supported by the hardware (based on BOOST_HW_SIMD*),
but not necessarily by the compiler or selected architecture

BOOST_LIB_TYPE_AVAILABLE:
 TYPE is available from the c++library/compiler
 For example, float80_t: has HW support on x86
(BOOST_HW_FLOAT80_AVAILABLE is defined), but not on MSVC
(BOOST_LIB_FLOAT80_AVAILABLE is not defined then)

BOOST_SW_TYPE_AVAILABLE:
 there is an external emulation of TYPE
 For example, multiprecision A's complement fixed precision integer
(TODO) or "half" by sourceforge
 Of course, this must be set manually.

At least for int/float/decimal 8..512 this should be available.

BOOST_HW_MACHINE_SIZE: the real word size of HW
BOOST_ARCH_MACHINE_SIZE: the word size of the architecture
 For example, DOS on AMD Ryzen BOOST_HW_MACHINE_SIZE = 64 and
BOOST_ARCH_MACHINE_SIZE = 16

multiprecision/float128_t:
 there are still many features missing
 most values ​​in numeric_limits<float128_t> are not constexpr

math::constants:
 i miss log2(2/e/pi/10) etc

and i miss
 BOOST_COMP_VECTOR_EXTENSIONS_AVAILABLE if the compiler supports
             __attribute__(__vector_size__(...)) and
BOOST_COMP_VECTOR_EXTENDED_EXTENSIONS_AVAILABLE if the compiler supports
extendet vector extensions (currently only clang/llvm?)

and BOOST_ARTIFICIAL
 __attribute__((artificial)) if supported

thx




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net