Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scope of MXCSR control register?

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!

like image 470
moala Avatar asked Feb 09 '11 17:02

moala


1 Answers

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.

like image 172
GJ. Avatar answered Nov 05 '22 22:11

GJ.