MCPcopy Create free account
hub / github.com/cameron314/concurrentqueue / capture_fp_settings

Method capture_fp_settings

benchmarks/tbb/task_group_context.cpp:442–452  ·  view source on GitHub ↗

IMPORTANT: It is assumed that this method is not used concurrently!

Source from the content-addressed store, hash-verified

440#if __TBB_FP_CONTEXT
441// IMPORTANT: It is assumed that this method is not used concurrently!
442void 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
454void 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." );

Callers 1

arenaMethod · 0.80

Calls 1

get_envMethod · 0.45

Tested by

no test coverage detected