Skip to Main Content
Intel Threading Building Blocks
book

Intel Threading Building Blocks

by James Reinders
July 2007
Intermediate to advanced content levelIntermediate to advanced
332 pages
10h 4m
English
O'Reilly Media, Inc.
Content preview from Intel Threading Building Blocks

Concurrent Operations

The methods described in this section safely execute on the same instance of a concurrent_vector<T>:

size_type grow_by( size_type delta )

Effects: atomically appends delta elements to the end of the vector. The new elements are initialized with T(), where T is the type of the values in the vector.

Returns: old size of the vector. If it returns k, the new elements are at the half-open index range [k…k+delta).

void grow_to_at_least( size_type n )

Effects: grows the vector until it has at least n elements. The new elements are initialized with T(), where T is the type of the values in the vector.

size_t push_back( const_reference value );

Effects: atomically appends a copy of value to the end of the vector.

Returns: index of the copy.

reference operator[]( size_type index )

Returns: reference to the element with the specified index.

const_reference operator[]( size_type index )const;

Returns: const reference to the element with the specified index.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Rezaur Rahman

Publisher Resources

ISBN: 9780596514808Errata Page