次の方法で共有


copy 関数

C++ のストレージ ・ システムのオブジェクトをコピーします。すべての同期データ転送の要件が満たされています。アクセラレータ上でコードを実行するとデータをコピーすることはできません。この関数の一般的な形式はcopy(src, dest)。

template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array<_Value_type,
   _Rank>& _Src,
   array<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename InputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   InputIterator _SrcFirst,
   InputIterator _SrcLast,
   array<_Value_type,
   _Rank> &_Dest                     
);
                     
template <
   typename InputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   InputIterator _SrcFirst,
   array<_Value_type,
   _Rank> &_Dest                     
);
                     
template <
   typename OutputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array<_Value_type,
   _Rank> &_Src,
   OutputIterator _DestIter                     
);
                     
template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array<_Value_type,
   _Rank>& _Src,
   array_view<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array_view<const _Value_type,
   _Rank>& _Src,
   array<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array_view<_Value_type,
   _Rank>& _Src,
   array<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array_view<const _Value_type,
   _Rank>& _Src,
   array_view<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array_view<_Value_type,
   _Rank>& _Src,
   array_view<_Value_type,
   _Rank>& _Dest                     
);
                     
template <
   typename InputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   InputIterator _SrcFirst,
   InputIterator _SrcLast,
   array_view<_Value_type,
   _Rank> &_Dest                     
);
                     
template <
   typename InputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   InputIterator _SrcFirst,
   array_view<_Value_type,
   _Rank> &_Dest                     
);
                     
template <
   typename OutputIterator,
   typename _Value_type,
   int _Rank                     
>
void copy(
   const array_view<_Value_type,
   _Rank> &_Src,
   OutputIterator _DestIter                     
);

パラメーター

  • _Dest
    コピーするオブジェクト。

  • _DestIter
    出力反復子に宛先の開始位置。

  • InputIterator
    入力の: イテレータの種類を指定します。

  • OutputIterator
    出力反復子の型。

  • _Rank
    コピー元のオブジェクトまたはオブジェクトをコピーするのランク。

  • _Src
    オブジェクトをコピーするには。

  • _SrcFirst
    最初の反復子はソース コンテナーに。

  • _SrcLast
    終了反復子はソース コンテナーにします。

  • _Value_type
    コピーされる要素のデータ型。

解説

コピー操作は、常に、深いコピーを実行します。

元と変換先オブジェクトの範囲が一致しない場合は、 runtime_exception がスローされます。

コピーすることができますアレイarray_view 、次のソースからのオブジェクト。

  • arrayまたはarray_view 、リンク先として、同じランクおよび要素の型を持つarrayまたはarray_view

  • 要素型は、リンク先と同じ標準コンテナー arrayまたはarray_view。公開するコンテナー **size()data()**メンバーをより効率的に実行します。

必要条件

ヘッダー: amp.h

名前空間: Concurrency

参照

関連項目

Concurrency 名前空間 (C++ AMP)