9

I'm wondering what is the lifetime of the value stored in the MXCSR control register (including FTZ and DAZ config for denormal floating-point numbers): is it in the scope of the thread, or is it common for all processing on the CPU/FPU?

What I want to know is if I need to set it (MXCSR) at my needs at the beginning of each thread of a thread pool, or once in the app, or would it impact everything else in the app and/or the system?

Thanks for any help!

Paul R
  • 208,748
  • 37
  • 389
  • 560
moala
  • 5,094
  • 9
  • 45
  • 66

1 Answers1

9

Yes of course, you must set the MXCSR register at the beginning of each thread. Any thread can have own MXCSR settings, so this is essential feature.

GJ.
  • 10,810
  • 2
  • 45
  • 62