copy_async Function
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Copies a C++ AMP object and returns future<void> that can be waited on. You can't copy data when running code on an accelerator. The general form of this function is copy(src, dest).
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array<_Value_type,
_Rank>& _Src,
array<_Value_type,
_Rank>& _Dest
);
template <
typename InputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
InputIterator_SrcFirst,
InputIterator_SrcLast,
array<_Value_type,
_Rank> &_Dest
);
template <
typename InputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
InputIterator_SrcFirst,
array<_Value_type,
_Rank> &_Dest
);
template <
typename OutputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array<_Value_type,
_Rank> &_Src,
OutputIterator_DestIter
);
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array<_Value_type,
_Rank>& _Src,
array_view<_Value_type,
_Rank>& _Dest
);
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array_view<const _Value_type,
_Rank>& _Src,
array<_Value_type,
_Rank>& _Dest
);
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array_view<_Value_type,
_Rank>& _Src,
array<_Value_type,
_Rank>& _Dest
);
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array_view<const _Value_type,
_Rank>& _Src,
array_view<_Value_type,
_Rank>& _Dest
);
template <
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array_view<_Value_type,
_Rank>& _Src,
array_view<_Value_type,
_Rank>& _Dest
);
template <
typename InputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
InputIterator_SrcFirst,
InputIterator_SrcLast,
array_view<_Value_type,
_Rank> &_Dest
);
template <
typename InputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
InputIterator_SrcFirst,
array_view<_Value_type,
_Rank> &_Dest
);
template <
typename OutputIterator,
typename _Value_type,
int _Rank
>
std::future<int> copy_async(
const array_view<_Value_type,
_Rank> &_Src,
OutputIterator_DestIter
);
The copy operation always performs a deep copy.
If the extents of the source and destination objects do not match, a runtime_exception is thrown.
You can copy to array and array_view objects from the following sources:
-
An array or array_view that has the same rank and element type as the destination array or array_view.
-
A standard container whose element type is the same as the destination array or array_view. Containers that expose size() and data() members (for example, std::vector and std::array) can be handled more efficiently.