IMPORTANT: It is assumed that this method is not used concurrently!
| 440 | #if __TBB_FP_CONTEXT |
| 441 | // IMPORTANT: It is assumed that this method is not used concurrently! |
| 442 | void task_group_context::capture_fp_settings () { |
| 443 | //! TODO: Add assertion that this context does not have children |
| 444 | // No fences are necessary since this context can be accessed from another thread |
| 445 | // only after stealing happened (which means necessary fences were used). |
| 446 | cpu_ctl_env &ctl = *internal::punned_cast<cpu_ctl_env*>(&my_cpu_ctl_env); |
| 447 | if ( !(my_version_and_traits & fp_settings) ) { |
| 448 | new ( &ctl ) cpu_ctl_env; |
| 449 | my_version_and_traits |= fp_settings; |
| 450 | } |
| 451 | ctl.get_env(); |
| 452 | } |
| 453 | |
| 454 | void task_group_context::copy_fp_settings( const task_group_context &src ) { |
| 455 | __TBB_ASSERT( !(my_version_and_traits & fp_settings), "The context already has FPU settings." ); |