|
Boost Users : |
From: Neill Clift (NeillClift_at_[hidden])
Date: 2020-09-15 21:06:28
Hi,
I managed to get boost multi-precision to work with 128 bit integers on Windows using clang.
I had to change this in clang.hpp:
#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER) <--- remove this last thing
# define BOOST_HAS_INT128
#endif
Clang-cl defines _MSC_VER for compat I guess.
I had to pull in the library clang_rt.builtins-x86_64.lib for two routines needed for division and remainder.
For my particular application I only saw a 10% improvement in performance.
I am wondering if there are other things that need to be changed to get better performance? My program deals with integers of various sizes so it might be an artifact of the sizes of integers I mostly do operations on.
I was expecting a bigger return. I am seeing the most expensive routine being _udivmodti4 on profiling. Division wasn't showing up as much in the traces before I made the change.
Thanks.
Neill.
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