Boost logo

Boost Users :

Subject: [Boost-users] multiprecision thread safety
From: Daniel Brake (danielthebrake_at_[hidden])
Date: 2016-01-14 12:56:07

Hi Boost,
I have a couple of questions regarding thread safety and
Boost.Multiprecision. I am writing a library, and would like to be able to
use mpfr_float (packed into my own complex class) in differing variable
precisions on multiple threads simultaneously.

   1. Is this supported? I looked in documentation, but didn't find
   comments to that end.
   2. Must I manually call mpfr_free_cache when terminating threads, as
   recommended by the mpfr documentation? see, section 4.7 memory
   handling. If so, since Boost.Multiprecision claims to not change the
   default precision of mpfr_t, do I need to access the particular back end
   for the thread, and free its cache?

Daniel Brake

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at