MXCSR控制寄存器的范围? [英] Scope of MXCSR control register?
问题描述
我想知道MXCSR控制寄存器中存储的值的生存期是多少(包括用于非常规浮点数的FTZ和DAZ配置):是否在线程范围内,还是CPU/FPU上的所有处理都通用?
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?
我想知道的是,是否需要在线程池的每个线程的开始处或在应用程序中一次设置它(MXCSR),还是会影响应用程序中的其他所有内容和/或系统吗?
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?
感谢您的帮助!
推荐答案
是的,您必须在每个线程的开头设置MXCSR寄存器.任何线程都可以拥有自己的MXCSR设置,因此这是必不可少的功能.
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.
这篇关于MXCSR控制寄存器的范围?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!