tbb_stddef.h File Reference
`#include "tbb_config.h"`
`#include <cstddef>`
`#include <stdint.h>`
`#include <utility>`
Include dependency graph for tbb_stddef.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes

struct | tbb::internal::padded_base< T, S, R >
struct | tbb::internal::padded_base< T, S, 0 >
struct | tbb::internal::padded< T, S >
| Pads type T to fill out to a multiple of cache line size. More...
class | tbb::internal::no_assign
| Base class for types that should not be assigned. More...
class | tbb::internal::no_copy
| Base class for types that should not be copied or assigned. More...
class | tbb::internal::mutex_copy_deprecated_and_disabled
struct | tbb::internal::version_tag_v3
class | tbb::split
| Dummy type that distinguishes splitting constructor from copy constructor. More...
class | tbb::proportional_split
| Type enables transmission of splitting proportion from partitioners to range objects. More...
struct | tbb::internal::allocator_type< T >
| Class for determining type of std::allocator<T>::value_type. More...
struct | tbb::internal::bool_constant< v >
struct | tbb::internal::select_size_t_constant< u, ull >
| A template to select either 32-bit or 64-bit constant as compile time, depending on machine word size. More...
struct | tbb::internal::STATIC_ASSERTION_FAILED< false >

## Namespaces

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

## Macros

#define | TBB_VERSION_MAJOR 2020
#define | TBB_VERSION_MINOR 3
#define | TBB_INTERFACE_VERSION 11103
#define | TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000
#define | TBB_COMPATIBLE_INTERFACE_VERSION 2
#define | __TBB_STRING_AUX(x) #x
#define | __TBB_STRING(x) __TBB_STRING_AUX(x)
#define | __TBB_EXPORTED_FUNC
#define | __TBB_EXPORTED_METHOD
#define | __TBB_NOINLINE(decl) decl
#define | __TBB_NOEXCEPT(expression) noexcept(expression)
#define | __TBB_ASSERT_RELEASE(predicate, message) ((predicate)?((void)0) : tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))
#define | __TBB_ASSERT(predicate, comment) ((void)0)
| No-op version of __TBB_ASSERT. More...
#define | __TBB_ASSERT_EX(predicate, comment) ((void)(1 && (predicate)))
| "Extended" version is useful to suppress warnings if a variable is only used with an assert More...
#define | __TBB_atomic
#define | __TBB_override override
#define | __TBB_fallthrough
#define | __TBB_offsetof(class_name, member_name) ((ptrdiff_t)&(reinterpret_cast<class_name*>(0x1000)->member_name) - 0x1000)
| Extended variant of the standard offsetof macro. More...
#define | __TBB_get_object_ref(class_name, member_name, member_addr) (*reinterpret_cast<class_name*>((char*)member_addr - __TBB_offsetof(class_name, member_name)))
| Returns address of the object containing a member with the given name and address. More...
#define | __TBB_TRY
#define | __TBB_CATCH(e) if ( tbb::internal::__TBB_false() )
#define | __TBB_THROW(e) tbb::internal::suppress_unused_warning(e)
#define | __TBB_RETHROW() ((void)0)
#define | __TBB_FORWARDING_REF(A) A&&
#define | __TBB_PARAMETER_PACK ...
#define | __TBB_PACK_EXPANSION(A) A...
#define | __TBB_STATIC_ASSERT(condition, msg) static_assert(condition,msg)

## Typedefs

typedef void(* | assertion_handler_type) (const char *filename, int line, const char *expression, const char *comment)
| Type for an assertion handler. More...
typedef version_tag_v3 | tbb::internal::version_tag
typedef bool_constant< true > | tbb::internal::true_type
typedef bool_constant< false > | tbb::internal::false_type

## Functions

assertion_handler_type __TBB_EXPORTED_FUNC | tbb::set_assertion_handler (assertion_handler_type new_handler)
| Set assertion handler and return previous value of it. More...
void __TBB_EXPORTED_FUNC | tbb::assertion_failure (const char *filename, int line, const char *expression, const char *comment)
| Process an assertion failure. More...
int __TBB_EXPORTED_FUNC | tbb::TBB_runtime_interface_version ()
| The function returns the interface version of the TBB shared library being used. More...
void __TBB_EXPORTED_FUNC | tbb::internal::handle_perror (int error_code, const char *aux_info)
| Throws std::runtime_error with what() returning error_code description prefixed with aux_info. More...
bool | tbb::internal::__TBB_false ()
void __TBB_EXPORTED_FUNC | tbb::internal::runtime_warning (const char *format,...)
| Report a runtime warning. More...
template<typename T >
void | tbb::internal::poison_pointer (T *__TBB_atomic &)
template<typename T , typename U >
T | tbb::internal::punned_cast (U *ptr)
| Cast between unrelated pointer types. More...
template<typename T >
bool | tbb::internal::is_aligned (T *pointer, uintptr_t alignment)
| A function to check if passed in pointer is aligned on a specific border. More...
template<typename integer_type >
bool | tbb::internal::is_power_of_two (integer_type arg)
| A function to check if passed integer is a power of 2. More...
template<typename argument_integer_type , typename divisor_integer_type >
argument_integer_type | tbb::internal::modulo_power_of_two (argument_integer_type arg, divisor_integer_type divisor)
| A function to compute arg modulo divisor where divisor is a power of 2. More...
template<typename argument_integer_type , typename power2_integer_type >
bool | tbb::internal::is_power_of_two_at_least (argument_integer_type arg, power2_integer_type power2)
| A function to determine if arg is a power of 2 at least as big as another power of 2. More...
template<typename T1 >
void | tbb::internal::suppress_unused_warning (const T1 &)
| Utility template function to prevent "unused" warnings by various compilers. More...
template<typename T1 , typename T2 >
void | tbb::internal::suppress_unused_warning (const T1 &, const T2 &)
template<typename T1 , typename T2 , typename T3 >
void | tbb::internal::suppress_unused_warning (const T1 &, const T2 &, const T3 &)

## Variables

const size_t | tbb::internal::NFS_MaxLineSize = 128
| Compile-time constant that is upper bound on cache line/sector size. More...

## Macro Definition Documentation

## __TBB_ASSERT

#define __TBB_ASSERT | ( |  | predicate,
|  |  | comment
| ) |  | ((void)0)

No-op version of __TBB_ASSERT.

Definition at line 165 of file tbb_stddef.h.

## __TBB_ASSERT_EX

#define __TBB_ASSERT_EX | ( |  | predicate,
|  |  | comment
| ) |  | ((void)(1 && (predicate)))

"Extended" version is useful to suppress warnings if a variable is only used with an assert

Definition at line 167 of file tbb_stddef.h.

## __TBB_ASSERT_RELEASE

#define __TBB_ASSERT_RELEASE | ( |  | predicate,
|  |  | message
| ) |  | ((predicate)?((void)0) : tbb::assertion_failure(__FILE__,__LINE__,#predicate,message))

Definition at line 134 of file tbb_stddef.h.

## __TBB_atomic

#define __TBB_atomic

Label for data that may be accessed from different threads, and that may eventually become wrapped in a formal atomic type.

Note that no problems have yet been observed relating to the definition currently being empty, even if at least "volatile" would seem to be in order to avoid data sometimes temporarily hiding in a register (although "volatile" as a "poor man's atomic" lacks several other features of a proper atomic, some of which are now provided instead through specialized functions).

Note that usage is intentionally compatible with a definition as qualifier "volatile", both as a way to have the compiler help enforce use of the label and to quickly rule out one potential issue.

Note however that, with some architecture/compiler combinations, e.g. on IA-64 architecture, "volatile" also has non-portable memory semantics that are needlessly expensive for "relaxed" operations.

Note that this must only be applied to data that will not change bit patterns when cast to/from an integral type of the same length; tbb::atomic must be used instead for, e.g., floating-point types.

TODO: apply wherever relevant

Definition at line 237 of file tbb_stddef.h.

## __TBB_CATCH

#define __TBB_CATCH | ( |  | e | ) | if ( tbb::internal::__TBB_false() )

Definition at line 284 of file tbb_stddef.h.

## __TBB_EXPORTED_FUNC

#define __TBB_EXPORTED_FUNC

Definition at line 97 of file tbb_stddef.h.

## __TBB_EXPORTED_METHOD

#define __TBB_EXPORTED_METHOD

Definition at line 98 of file tbb_stddef.h.

## __TBB_fallthrough

#define __TBB_fallthrough

Definition at line 250 of file tbb_stddef.h.

## __TBB_FORWARDING_REF

#define __TBB_FORWARDING_REF | ( |  | A | ) | A&&

Definition at line 517 of file tbb_stddef.h.

## __TBB_get_object_ref

#define __TBB_get_object_ref | ( |  | class_name,
|  |  | member_name,
|  |  | member_addr
| ) |  | (*reinterpret_cast<class_name*>((char*)member_addr - __TBB_offsetof(class_name, member_name)))

Returns address of the object containing a member with the given name and address.

Definition at line 270 of file tbb_stddef.h.

## __TBB_NOEXCEPT

#define __TBB_NOEXCEPT | ( |  | expression | ) | noexcept(expression)

Definition at line 110 of file tbb_stddef.h.

## __TBB_NOINLINE

#define __TBB_NOINLINE | ( |  | decl | ) | decl

Definition at line 106 of file tbb_stddef.h.

## __TBB_offsetof

#define __TBB_offsetof | ( |  | class_name,
|  |  | member_name
| ) |  | ((ptrdiff_t)&(reinterpret_cast<class_name*>(0x1000)->member_name) - 0x1000)

Extended variant of the standard offsetof macro.

The standard offsetof macro is not sufficient for TBB as it can be used for POD-types only. The constant 0x1000 (not NULL) is necessary to appease GCC.

Definition at line 266 of file tbb_stddef.h.

## __TBB_override

#define __TBB_override override

Definition at line 240 of file tbb_stddef.h.

## __TBB_PACK_EXPANSION

#define __TBB_PACK_EXPANSION | ( |  | A | ) | A...

Definition at line 525 of file tbb_stddef.h.

## __TBB_PARAMETER_PACK

#define __TBB_PARAMETER_PACK ...

Definition at line 524 of file tbb_stddef.h.

## __TBB_RETHROW

#define __TBB_RETHROW | ( |  | ) | ((void)0)

Definition at line 286 of file tbb_stddef.h.

## __TBB_STATIC_ASSERT

#define __TBB_STATIC_ASSERT | ( |  | condition,
|  |  | msg
| ) |  | static_assert(condition,msg)

Definition at line 553 of file tbb_stddef.h.

## __TBB_STRING

#define __TBB_STRING | ( |  | x | ) | __TBB_STRING_AUX(x)

Definition at line 33 of file tbb_stddef.h.

## __TBB_STRING_AUX

#define __TBB_STRING_AUX | ( |  | x | ) | #x

Definition at line 32 of file tbb_stddef.h.

## __TBB_THROW

#define __TBB_THROW | ( |  | e | ) | tbb::internal::suppress_unused_warning(e)

Definition at line 285 of file tbb_stddef.h.

## __TBB_TRY

#define __TBB_TRY

Definition at line 283 of file tbb_stddef.h.

## TBB_COMPATIBLE_INTERFACE_VERSION

#define TBB_COMPATIBLE_INTERFACE_VERSION 2

Definition at line 30 of file tbb_stddef.h.

## TBB_INTERFACE_VERSION

#define TBB_INTERFACE_VERSION 11103

Definition at line 25 of file tbb_stddef.h.

## TBB_INTERFACE_VERSION_MAJOR

#define TBB_INTERFACE_VERSION_MAJOR TBB_INTERFACE_VERSION/1000

Definition at line 26 of file tbb_stddef.h.

## TBB_VERSION_MAJOR

#define TBB_VERSION_MAJOR 2020

Definition at line 21 of file tbb_stddef.h.

## TBB_VERSION_MINOR

#define TBB_VERSION_MINOR 3

Definition at line 22 of file tbb_stddef.h.

## Typedef Documentation

## assertion_handler_type

typedef void(* assertion_handler_type) (const char *filename, int line, const char *expression, const char *comment)

Type for an assertion handler.

Definition at line 127 of file tbb_stddef.h.

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.