tbb::concurrent_vector< T, A >::internal_loop_guide Class Reference

Exception-aware helper class for filling a segment by exception-danger operators of user class. More...

Inheritance diagram for tbb::concurrent_vector< T, A >::internal_loop_guide:
Collaboration diagram for tbb::concurrent_vector< T, A >::internal_loop_guide:

## Public Member Functions

| internal_loop_guide (size_type ntrials, void *ptr)
void | init ()
void | init (const void *src)
void | copy (const void *src)
void | assign (const void *src)
void | move_assign (const void *src)
void | move_construct (const void *src)
template<class I >
void | iterate (I &src)
| ~internal_loop_guide ()

## Static Public Member Functions

static const T * | as_const_pointer (const void *ptr)
static T * | as_pointer (const void *src)

## Public Attributes

const pointer | array
const size_type | n
size_type | i

## Additional Inherited Members

Private Member Functions inherited from tbb::internal::no_copy
| no_copy (const no_copy &)=delete
| no_copy ()=default

## Detailed Description

### template<typename T, class A>
class tbb::concurrent_vector< T, A >::internal_loop_guide

Exception-aware helper class for filling a segment by exception-danger operators of user class.

Definition at line 1106 of file concurrent_vector.h.

## Constructor & Destructor Documentation

## internal_loop_guide()

template<typename T, class A>

tbb::concurrent_vector< T, A >::internal_loop_guide::internal_loop_guide | ( | size_type | ntrials,
|  | void * | ptr
| ) |  |

inline

Definition at line 1115 of file concurrent_vector.h.

: array(as_pointer(ptr)), n(ntrials), i(0) {}

## ~internal_loop_guide()

template<typename T, class A>

tbb::concurrent_vector< T, A >::internal_loop_guide::~internal_loop_guide | ( |  | ) |

inline

Definition at line 1131 of file concurrent_vector.h.

{
if(i < n) {// if an exception was raised, fill the rest of items with zeros
internal::handle_unconstructed_elements(array+i, n-i);
}
}

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::internal::handle_unconstructed_elements(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## Member Function Documentation

## as_const_pointer()

template<typename T, class A>

static const T* tbb::concurrent_vector< T, A >::internal_loop_guide::as_const_pointer | ( | const void * | ptr | ) |

inline static

Definition at line 1112 of file concurrent_vector.h.

{ return static_cast<const T *>(ptr); }

Referenced by tbb::concurrent_vector< T, A >::internal_loop_guide::assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::copy(), and tbb::concurrent_vector< T, A >::internal_loop_guide::init().

Here is the caller graph for this function:

## as_pointer()

template<typename T, class A>

static T* tbb::concurrent_vector< T, A >::internal_loop_guide::as_pointer | ( | const void * | src | ) |

inline static

Definition at line 1113 of file concurrent_vector.h.

{ return static_cast<T*>(const_cast<void *>(src)); }

Referenced by tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign(), and tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct().

Here is the caller graph for this function:

## assign()

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::assign | ( | const void * | src | ) |

inline

Definition at line 1120 of file concurrent_vector.h.

{ for(; i < n; ++i) array[i] = as_const_pointer(src)[i]; }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::as_const_pointer(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## copy()

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::copy | ( | const void * | src | ) |

inline

Definition at line 1119 of file concurrent_vector.h.

{ for(; i < n; ++i) new( &array[i] ) T(as_const_pointer(src)[i]); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::as_const_pointer(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## init() [1/2]

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::init | ( |  | ) |

inline

Definition at line 1117 of file concurrent_vector.h.

{ for(; i < n; ++i) new( &array[i] ) T(); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

## init() [2/2]

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::init | ( | const void * | src | ) |

inline

Definition at line 1118 of file concurrent_vector.h.

{ for(; i < n; ++i) new( &array[i] ) T(*as_const_pointer(src)); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::as_const_pointer(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## iterate()

template<typename T, class A>
template<class I >

void tbb::concurrent_vector< T, A >::internal_loop_guide::iterate | ( | I & | src | ) |

inline

Definition at line 1130 of file concurrent_vector.h.

{ for(; i < n; ++i, ++src) new( &array[i] ) T( *src ); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::i, and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

## move_assign()

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign | ( | const void * | src | ) |

inline

Definition at line 1122 of file concurrent_vector.h.

{ for(; i < n; ++i) array[i] = std::move(as_pointer(src)[i]); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::as_pointer(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, tbb::move(), and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## move_construct()

template<typename T, class A>

void tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct | ( | const void * | src | ) |

inline

Definition at line 1123 of file concurrent_vector.h.

{ for(; i < n; ++i) new( &array[i] ) T( std::move(as_pointer(src)[i]) ); }

References tbb::concurrent_vector< T, A >::internal_loop_guide::array, tbb::concurrent_vector< T, A >::internal_loop_guide::as_pointer(), tbb::concurrent_vector< T, A >::internal_loop_guide::i, tbb::move(), and tbb::concurrent_vector< T, A >::internal_loop_guide::n.

Here is the call graph for this function:

## Member Data Documentation

## array

template<typename T, class A>

const pointer tbb::concurrent_vector< T, A >::internal_loop_guide::array

Definition at line 1108 of file concurrent_vector.h.

Referenced by tbb::concurrent_vector< T, A >::internal_loop_guide::assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::copy(), tbb::concurrent_vector< T, A >::internal_loop_guide::init(), tbb::concurrent_vector< T, A >::internal_loop_guide::iterate(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct(), and tbb::concurrent_vector< T, A >::internal_loop_guide::~internal_loop_guide().

## i

template<typename T, class A>

size_type tbb::concurrent_vector< T, A >::internal_loop_guide::i

Definition at line 1110 of file concurrent_vector.h.

Referenced by tbb::concurrent_vector< T, A >::internal_loop_guide::assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::copy(), tbb::concurrent_vector< T, A >::internal_loop_guide::init(), tbb::concurrent_vector< T, A >::internal_loop_guide::iterate(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct(), and tbb::concurrent_vector< T, A >::internal_loop_guide::~internal_loop_guide().

## n

template<typename T, class A>

const size_type tbb::concurrent_vector< T, A >::internal_loop_guide::n

Definition at line 1109 of file concurrent_vector.h.

Referenced by tbb::concurrent_vector< T, A >::internal_loop_guide::assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::copy(), tbb::concurrent_vector< T, A >::internal_loop_guide::init(), tbb::concurrent_vector< T, A >::internal_loop_guide::iterate(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_assign(), tbb::concurrent_vector< T, A >::internal_loop_guide::move_construct(), and tbb::concurrent_vector< T, A >::internal_loop_guide::~internal_loop_guide().

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

- concurrent_vector.h

tbb::internal::handle_unconstructed_elements
void handle_unconstructed_elements(T *array, size_t n_of_elements)
Exception helper function.
Definition: concurrent_vector.h:77
tbb::concurrent_vector::internal_loop_guide::as_pointer
static T * as_pointer(const void *src)
Definition: concurrent_vector.h:1113
tbb::move
void move(tbb_thread &t1, tbb_thread &t2)
Definition: tbb_thread.h:319
tbb::concurrent_vector::internal_loop_guide::array
const pointer array
Definition: concurrent_vector.h:1108
tbb::concurrent_vector::internal_loop_guide::i
size_type i
Definition: concurrent_vector.h:1110
tbb::concurrent_vector::internal_loop_guide::as_const_pointer
static const T * as_const_pointer(const void *ptr)
Definition: concurrent_vector.h:1112
tbb::concurrent_vector::internal_loop_guide::n
const size_type n
Definition: concurrent_vector.h:1109

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.