gcc_ia32_common.h File Reference
`#include "gcc_itsx.h"`
Include dependency graph for gcc_ia32_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

class | tbb::internal::cpu_ctl_env

## Namespaces

| tbb
| The graph class.
| tbb::internal
| Identifiers declared inside namespace internal should never be used directly by client code.

## Macros

#define | __TBB_Log2(V) __TBB_machine_lg(V)
#define | __TBB_Pause(V) __TBB_machine_pause(V)
#define | __TBB_time_stamp() __TBB_machine_time_stamp()
#define | __TBB_CPU_CTL_ENV_PRESENT 1

## Typedefs

typedef uint64_t | tbb::internal::machine_tsc_t

## Functions

template<typename T >
static intptr_t | __TBB_machine_lg (T x)
static void | __TBB_machine_pause (int32_t delay)
static tbb::internal::machine_tsc_t | __TBB_machine_time_stamp ()

## Macro Definition Documentation

## __TBB_CPU_CTL_ENV_PRESENT

#define __TBB_CPU_CTL_ENV_PRESENT 1

Definition at line 67 of file gcc_ia32_common.h.

## __TBB_Log2

#define __TBB_Log2 | ( |  | V | ) | __TBB_machine_lg(V)

Definition at line 31 of file gcc_ia32_common.h.

## __TBB_Pause

#define __TBB_Pause | ( |  | V | ) | __TBB_machine_pause(V)

Definition at line 50 of file gcc_ia32_common.h.

## __TBB_time_stamp

#define __TBB_time_stamp | ( |  | ) | __TBB_machine_time_stamp()

Definition at line 63 of file gcc_ia32_common.h.

## Function Documentation

## __TBB_machine_lg()

template<typename T >

static intptr_t __TBB_machine_lg | ( | T | x | ) |

inline static

Definition at line 25 of file gcc_ia32_common.h.

{
__TBB_ASSERT(x>0, "The logarithm of a non-positive value is undefined.");
uintptr_t j, i = x;
__asm__("bsr %1,%0" : "=r"(j) : "r"(i));
return j;
}
__TBB_ASSERT
#define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
Definition: tbb_stddef.h:165

References __TBB_ASSERT.

## __TBB_machine_pause()

static void __TBB_machine_pause | ( | int32_t | delay | ) |

inline static

Definition at line 44 of file gcc_ia32_common.h.

{
for (int32_t i = 0; i < delay; i++) {
__asm__ __volatile__("pause;");
}
return;
}

## __TBB_machine_time_stamp()

static tbb::internal::machine_tsc_t __TBB_machine_time_stamp | ( |  | ) |

inline static

Definition at line 54 of file gcc_ia32_common.h.

{
#if __INTEL_COMPILER
return _rdtsc();
#else
tbb::internal::uint32_t hi, lo;
__asm__ __volatile__("rdtsc" : "=d"(hi), "=a"(lo));
return (tbb::internal::machine_tsc_t( hi ) << 32) | lo;
#endif
}
tbb::internal::machine_tsc_t
uint64_t machine_tsc_t
Definition: gcc_ia32_common.h:53

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.