The Vivandiere
The Vivandiere

Reputation: 3191

Thread safety for boost ublas matrix

I need to synchronize access to a container of boost::numeric::ublas::matrix type amongst my main thread and a couple of worker threads. Do I need to explicitly code for synchronization using locks? Or is the ublas matrix container 'thread safe', which I think means that it uses locks internally to grant mutually exclusive access thereby preventing race conditions.

Upvotes: 0

Views: 255

Answers (1)

tmyklebu
tmyklebu

Reputation: 14215

You need to do your own explicit synchronisation. Mutices are a good choice for that.

Upvotes: 1

Related Questions