Home ⌂Doc Index ◂Up ▴
Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
tbb::internal::tls< T * > Class Template Reference

#include <tls.h>

Inheritance diagram for tbb::internal::tls< T * >:
Collaboration diagram for tbb::internal::tls< T * >:

Public Member Functions

 tls ()
 
 ~tls ()
 
T * operator= (T *value)
 
 operator T * ()
 
T * operator-> ()
 
T & operator * ()
 

Private Types

typedef basic_tls< T * > base
 

Private Member Functions

T * internal_get ()
 
- Private Member Functions inherited from tbb::internal::basic_tls< T * >
int create ()
 
int destroy ()
 
void set (T * value)
 
T * get ()
 

Static Private Member Functions

static void internal_dtor (void *ptr)
 

Detailed Description

template<typename T>
class tbb::internal::tls< T * >

Definition at line 88 of file tls.h.

Member Typedef Documentation

◆ base

template<typename T >
typedef basic_tls<T*> tbb::internal::tls< T * >::base
private

Definition at line 89 of file tls.h.

Constructor & Destructor Documentation

◆ tls()

template<typename T >
tbb::internal::tls< T * >::tls ( )
inline

Definition at line 102 of file tls.h.

102  {
103 #if USE_PTHREAD
105 #else
106  base::create();
107 #endif
108  }
static void internal_dtor(void *ptr)
Definition: tls.h:90

◆ ~tls()

template<typename T >
tbb::internal::tls< T * >::~tls ( )
inline

Definition at line 109 of file tls.h.

109 { base::destroy(); }

Member Function Documentation

◆ internal_dtor()

template<typename T >
static void tbb::internal::tls< T * >::internal_dtor ( void ptr)
inlinestaticprivate

Definition at line 90 of file tls.h.

90  {
91  if (ptr) delete (T*)ptr;
92  }

◆ internal_get()

template<typename T >
T* tbb::internal::tls< T * >::internal_get ( )
inlineprivate

Definition at line 93 of file tls.h.

93  {
94  T* result = base::get();
95  if (!result) {
96  result = new T;
97  base::set(result);
98  }
99  return result;
100  }
void set(T value)
Definition: tls.h:56

◆ operator *()

template<typename T >
T& tbb::internal::tls< T * >::operator * ( )
inline

Definition at line 113 of file tls.h.

113 { return *internal_get(); }

◆ operator T *()

template<typename T >
tbb::internal::tls< T * >::operator T * ( )
inline

Definition at line 111 of file tls.h.

111 { return internal_get(); }

◆ operator->()

template<typename T >
T* tbb::internal::tls< T * >::operator-> ( )
inline

Definition at line 112 of file tls.h.

112 { return internal_get(); }

◆ operator=()

template<typename T >
T* tbb::internal::tls< T * >::operator= ( T *  value)
inline

Definition at line 110 of file tls.h.

110 { base::set(value); return value; }
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
void set(T value)
Definition: tls.h:56

References value.


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

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.