tbb::internal::cpu_ctl_env Class Reference

`#include <gcc_ia32_common.h>`

Collaboration diagram for tbb::internal::cpu_ctl_env:

## Public Member Functions

bool | operator!= (const cpu_ctl_env &ctl) const
void | get_env ()
void | set_env () const
bool | operator!= (const cpu_ctl_env &ctl) const
void | get_env ()
void | set_env () const
bool | operator!= (const cpu_ctl_env &ctl) const
void | get_env ()
void | set_env () const
| cpu_ctl_env ()
| ~cpu_ctl_env ()
| cpu_ctl_env (const cpu_ctl_env &src)
cpu_ctl_env & | operator= (const cpu_ctl_env &src)
bool | operator!= (const cpu_ctl_env &ctl) const
void | get_env ()
const cpu_ctl_env & | set_env () const

## Private Attributes

int | mxcsr
short | x87cw
unsigned int | my_ctl
fenv_t * | my_fenv_ptr

## Static Private Attributes

static const int | MXCSR_CONTROL_MASK = ~0x3f

## Detailed Description

Definition at line 70 of file gcc_ia32_common.h.

## Constructor & Destructor Documentation

## cpu_ctl_env() [1/2]

tbb::internal::cpu_ctl_env::cpu_ctl_env | ( |  | ) |

inline

Definition at line 413 of file scheduler_common.h.

: my_fenv_ptr(NULL) {}

## ~cpu_ctl_env()

tbb::internal::cpu_ctl_env::~cpu_ctl_env | ( |  | ) |

inline

Definition at line 414 of file scheduler_common.h.

{
if ( my_fenv_ptr )
tbb::internal::NFS_Free( (void*)my_fenv_ptr );
}

References tbb::internal::NFS_Free().

Here is the call graph for this function:

## cpu_ctl_env() [2/2]

tbb::internal::cpu_ctl_env::cpu_ctl_env | ( | const cpu_ctl_env & | src | ) |

inline

Definition at line 424 of file scheduler_common.h.

: my_fenv_ptr(NULL) {
*this = src;
}

## Member Function Documentation

## get_env() [1/4]

void tbb::internal::cpu_ctl_env::get_env | ( |  | ) |

inline

Definition at line 77 of file gcc_ia32_common.h.

{
#if __TBB_ICC_12_0_INL_ASM_FSTCW_BROKEN
cpu_ctl_env loc_ctl;
__asm__ __volatile__ (
"stmxcsr %0\n\t"
"fstcw %1"
: "=m"(loc_ctl.mxcsr), "=m"(loc_ctl.x87cw)
);
*this = loc_ctl;
#else
__asm__ __volatile__ (
"stmxcsr %0\n\t"
"fstcw %1"
: "=m"(mxcsr), "=m"(x87cw)
);
#endif
mxcsr &= MXCSR_CONTROL_MASK;
}

References mxcsr, MXCSR_CONTROL_MASK, and x87cw.

Referenced by tbb::internal::arena::arena().

Here is the caller graph for this function:

## get_env() [2/4]

void tbb::internal::cpu_ctl_env::get_env | ( |  | ) |

inline

Definition at line 121 of file msvc_armv7.h.

{ my_ctl = _control87(0, 0); }

References my_ctl.

## get_env() [3/4]

void tbb::internal::cpu_ctl_env::get_env | ( |  | ) |

inline

Definition at line 234 of file msvc_ia32_common.h.

{
__TBB_get_cpu_ctl_env( this );
mxcsr &= MXCSR_CONTROL_MASK;
}

References __TBB_get_cpu_ctl_env(), mxcsr, and MXCSR_CONTROL_MASK.

Here is the call graph for this function:

## get_env() [4/4]

void tbb::internal::cpu_ctl_env::get_env | ( |  | ) |

inline

Definition at line 439 of file scheduler_common.h.

{
if ( !my_fenv_ptr )
my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL);
fegetenv( my_fenv_ptr );
}

References tbb::internal::NFS_Allocate().

Here is the call graph for this function:

## operator!=() [1/4]

bool tbb::internal::cpu_ctl_env::operator!= | ( | const cpu_ctl_env & | ctl | ) | const

inline

Definition at line 76 of file gcc_ia32_common.h.

{ return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw; }

References mxcsr, and x87cw.

## operator!=() [2/4]

bool tbb::internal::cpu_ctl_env::operator!= | ( | const cpu_ctl_env & | ctl | ) | const

inline

Definition at line 120 of file msvc_armv7.h.

{ return my_ctl != ctl.my_ctl; }

References my_ctl.

## operator!=() [3/4]

bool tbb::internal::cpu_ctl_env::operator!= | ( | const cpu_ctl_env & | ctl | ) | const

inline

Definition at line 233 of file msvc_ia32_common.h.

{ return mxcsr != ctl.mxcsr || x87cw != ctl.x87cw; }

References mxcsr, and x87cw.

## operator!=() [4/4]

bool tbb::internal::cpu_ctl_env::operator!= | ( | const cpu_ctl_env & | ctl | ) | const

inline

Definition at line 434 of file scheduler_common.h.

{
__TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." );
__TBB_ASSERT( ctl.my_fenv_ptr, "cpu_ctl_env is not initialized." );
return memcmp( (void*)my_fenv_ptr, (void*)ctl.my_fenv_ptr, sizeof(fenv_t) );
}

References __TBB_ASSERT, and my_fenv_ptr.

## operator=()

cpu_ctl_env& tbb::internal::cpu_ctl_env::operator= | ( | const cpu_ctl_env & | src | ) |

inline

Definition at line 427 of file scheduler_common.h.

{
__TBB_ASSERT( src.my_fenv_ptr, NULL );
if ( !my_fenv_ptr )
my_fenv_ptr = (fenv_t*)tbb::internal::NFS_Allocate(1, sizeof(fenv_t), NULL);
*my_fenv_ptr = *src.my_fenv_ptr;
return *this;
}

References __TBB_ASSERT, my_fenv_ptr, and tbb::internal::NFS_Allocate().

Here is the call graph for this function:

## set_env() [1/4]

void tbb::internal::cpu_ctl_env::set_env | ( |  | ) | const

inline

Definition at line 95 of file gcc_ia32_common.h.

{
__asm__ __volatile__ (
"ldmxcsr %0\n\t"
"fldcw %1"
: : "m"(mxcsr), "m"(x87cw)
);
}

References mxcsr, and x87cw.

Referenced by tbb::internal::arena::process().

Here is the caller graph for this function:

## set_env() [2/4]

void tbb::internal::cpu_ctl_env::set_env | ( |  | ) | const

inline

Definition at line 122 of file msvc_armv7.h.

{ _control87( my_ctl, ~0U ); }

References my_ctl.

## set_env() [3/4]

void tbb::internal::cpu_ctl_env::set_env | ( |  | ) | const

inline

Definition at line 238 of file msvc_ia32_common.h.

{ __TBB_set_cpu_ctl_env( this ); }

References __TBB_set_cpu_ctl_env().

Here is the call graph for this function:

## set_env() [4/4]

const cpu_ctl_env& tbb::internal::cpu_ctl_env::set_env | ( |  | ) | const

inline

Definition at line 444 of file scheduler_common.h.

{
__TBB_ASSERT( my_fenv_ptr, "cpu_ctl_env is not initialized." );
fesetenv( my_fenv_ptr );
return *this;
}

References __TBB_ASSERT.

## Member Data Documentation

## mxcsr

int tbb::internal::cpu_ctl_env::mxcsr

private

Definition at line 72 of file gcc_ia32_common.h.

Referenced by get_env(), operator!=(), and set_env().

## MXCSR_CONTROL_MASK

static const int tbb::internal::cpu_ctl_env::MXCSR_CONTROL_MASK = ~0x3f

static private

Definition at line 74 of file gcc_ia32_common.h.

Referenced by get_env().

## my_ctl

unsigned int tbb::internal::cpu_ctl_env::my_ctl

private

Definition at line 118 of file msvc_armv7.h.

Referenced by get_env(), operator!=(), and set_env().

## my_fenv_ptr

fenv_t* tbb::internal::cpu_ctl_env::my_fenv_ptr

private

Definition at line 411 of file scheduler_common.h.

Referenced by operator!=(), and operator=().

## x87cw

short tbb::internal::cpu_ctl_env::x87cw

private

Definition at line 73 of file gcc_ia32_common.h.

Referenced by get_env(), operator!=(), and set_env().

The documentation for this class was generated from the following files:

- gcc_ia32_common.h
- msvc_armv7.h
- msvc_ia32_common.h
- scheduler_common.h

tbb::internal::cpu_ctl_env::my_fenv_ptr
fenv_t * my_fenv_ptr
Definition: scheduler_common.h:411
__TBB_set_cpu_ctl_env
void __TBB_set_cpu_ctl_env(const tbb::internal::cpu_ctl_env *ctl)
Definition: msvc_ia32_common.h:211
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165
__TBB_get_cpu_ctl_env
void __TBB_get_cpu_ctl_env(tbb::internal::cpu_ctl_env *ctl)
Definition: msvc_ia32_common.h:204
tbb::internal::cpu_ctl_env::my_ctl
unsigned int my_ctl
Definition: msvc_armv7.h:118
tbb::internal::cpu_ctl_env::cpu_ctl_env
cpu_ctl_env()
Definition: scheduler_common.h:413
tbb::internal::cpu_ctl_env::mxcsr
int mxcsr
Definition: gcc_ia32_common.h:72
tbb::internal::cpu_ctl_env::x87cw
short x87cw
Definition: gcc_ia32_common.h:73
tbb::internal::cpu_ctl_env::MXCSR_CONTROL_MASK
static const int MXCSR_CONTROL_MASK
Definition: gcc_ia32_common.h:74
tbb::internal::NFS_Free
void __TBB_EXPORTED_FUNC NFS_Free(void *)
Free memory allocated by NFS_Allocate.
Definition: cache_aligned_allocator.cpp:198
tbb::internal::NFS_Allocate
void *__TBB_EXPORTED_FUNC NFS_Allocate(size_t n_element, size_t element_size, void *hint)
Allocate memory on cache/sector line boundary.
Definition: cache_aligned_allocator.cpp:176

Copyright © 2005-2020 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.