This topic has not yet been rated - Rate this topic

copy_async Function

Visual Studio 11

[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
                    
);
        
_Value_type

The data type of the elements that are copied.

InputIterator
OutputIterator
_Rank

The rank of the object to copy from or the object to copy to.

src

To object to copy.

dest

The object to copy to.

first
last
result

A future<void> that can be waited on.

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.

Header: amp.h

Namespace: Concurrency

Did you find this helpful?
(1500 characters remaining)