hpx/compute/vector.hpp¶
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace
hpx
-
namespace
compute
Functions
-
template<typename
T
, typenameAllocator
= std::allocator<T>>
classvector
¶ Public Types
-
template<>
usingvalue_type
= T¶ Member types (FIXME: add reference to std.
-
template<>
usingallocator_type
= Allocator¶
-
template<>
usingaccess_target
= typename alloc_traits::access_target¶
-
template<>
usingreference
= typename alloc_traits::reference¶
-
template<>
usingconst_reference
= typename alloc_traits::const_reference¶
-
template<>
usingpointer
= typename alloc_traits::pointer¶
-
template<>
usingconst_pointer
= typename alloc_traits::const_pointer¶
-
template<>
usingiterator
= detail::iterator<T, Allocator>¶
-
template<>
usingconst_iterator
= detail::iterator<T const, Allocator>¶
-
template<>
usingreverse_iterator
= detail::reverse_iterator<T, Allocator>¶
-
template<>
usingconst_reverse_iterator
= detail::const_reverse_iterator<T, Allocator>¶
Public Functions
-
vector
(Allocator const &alloc = Allocator())¶
-
vector
(size_type count, T const &value, Allocator const &alloc = Allocator())¶
-
vector
(size_type count, Allocator const &alloc = Allocator())¶
-
template<typename
InIter
, typenameEnable
= typename std::enable_if<hpx::traits::is_input_iterator<InIter>::value>::type>vector
(InIter first, InIter last, Allocator const &alloc)¶
-
~vector
()¶
-
vector &
operator=
(vector const &other)¶
-
vector &
operator=
(vector &&other)¶
-
allocator_type
get_allocator
() const¶ Returns the allocator associated with the container.
-
reference
operator[]
(size_type pos)¶
-
const_reference
operator[]
(size_type pos) const¶
-
pointer
data
()¶ Returns pointer to the underlying array serving as element storage. The pointer is such that range [data(); data() + size()) is always a valid range, even if the container is empty (data() is not dereferenceable in that case).
-
const_pointer
data
() const¶ Returns pointer to the underlying array serving as element storage. The pointer is such that range [data(); data() + size()) is always a valid range, even if the container is empty (data() is not dereferenceable in that case).
-
T *
device_data
() const¶ Returns a raw pointer corresponding to the address of the data allocated on the device.
-
bool
empty
() const¶ Returns: size() == 0.
-
void
resize
(size_type)¶ Effects: If size <= size(), equivalent to calling pop_back() size() - size times. If size() < size, appends size - size() default-inserted elements to the sequence.
Requires: T shall be MoveInsertable and DefaultInsertable into *this.
Remarks: If an exception is thrown other than by the move constructor of a non-CopyInsertable T there are no effects.
-
void
resize
(size_type, T const&)¶ Effects: If size <= size(), equivalent to calling pop_back() size() - size times. If size() < size, appends size - size() copies of val to the sequence.
Requires: T shall be CopyInsertable into *this.
Remarks: If an exception is thrown there are no effects.
-
iterator
begin
()¶
-
iterator
end
()¶
-
const_iterator
cbegin
() const¶
-
const_iterator
cend
() const¶
-
const_iterator
begin
() const¶
-
const_iterator
end
() const¶
-
void
swap
(vector &other)¶ Effects: Exchanges the contents and capacity() of *this with that of x.
Complexity: Constant time.
-
void
clear
()¶ Effects: Erases all elements in the range [begin(),end()). Destroys all elements in a. Invalidates all references, pointers, and iterators referring to the elements of a and may invalidate the past-the-end iterator.
Post: a.empty() returns true.
Complexity: Linear.
-
template<>
-
template<typename
-
namespace