It’s cool that OMP and c++11 threads are both on the horizon but I’m concerned that they’ll end up creating too many threads when they interact. The way this would happen is if a density using OMP were called within map_rect_concurrent. I guess just dropping a note here to say things like map_rect_concurrent will end up having to temporarily set a lower number of threads for OMP. Could even be done with a guard object so it gets destructed at the end, or by having a per program thread pool.
We absolutely need to figure out how to configure these things when we have MPI, GPU, and multi-threading both within the library for matrix operations and available as a map operation within the language.