2

Armadillo is a C++ linear algebra library. I wonder if its implementation is thread safe? For example, I have a matrix A, and there are 2 threads modifying it. I looked at its documentation but this is not mentioned.

alibaba
  • 45
  • 4

1 Answers1

3

You can safely assume that everything is not thread-safe by default, unless stated otherwise.

This is because thread-safety adds overhead (locking) that would penalize single-threaded usage for no good reason. E.g. you can use a matrix in a multi-threaded application without ever sharing it with other threads.

Maxim Egorushkin
  • 131,725
  • 17
  • 180
  • 271