次の方法で共有


array::section メソッド

指定された原点にある array オブジェクトのサブセクションを返し、これは必要に応じて範囲が指定されます。

array_view<_Value_type,_Rank> section(
   const Concurrency::index<_Rank>& _Section_origin,
   const Concurrency::extent<_Rank>& _Section_extent
) restrict(amp,cpu);

array_view<const _Value_type,_Rank> section(
   const Concurrency::index<_Rank>& _Section_origin,
   const Concurrency::extent<_Rank>& _Section_extent
) const restrict(amp,cpu);

array_view<_Value_type,_Rank> section(
   const Concurrency::extent<_Rank>& _Ext
) restrict(amp,cpu);

array_view<const _Value_type,_Rank> section(
   const Concurrency::extent<_Rank>& _Ext
) const restrict(amp,cpu);

array_view<_Value_type,_Rank> section(
   const index<_Rank>& _Idx
) restrict(amp,cpu);

array_view<const _Value_type,_Rank> section(
   const index<_Rank>& _Idx
) const restrict(amp,cpu);

array_view<_Value_type,1> section(
   int _I0,
   int _E0
) restrict(amp,cpu);

array_view<const _Value_type,1> section(
   int _I0,
   int _E0
) const restrict(amp,cpu);

array_view<_Value_type,2> section(
   int _I0,
   int _I1,
   int _E0,
   int _E1
) restrict(amp,cpu);

array_view<const _Value_type,2> section(
   int _I0,
   int _I1,
   int _E0,
   int _E1
) const restrict(amp,cpu);

array_view<_Value_type,3> section(
   int _I0,
   int _I1,
   int _I2,
   int _E0,
   int _E1,
   int _E2
) restrict(amp,cpu);

array_view<const _Value_type,3> section(
   int _I0,
   int _I1,
   int _I2,
   int _E0,
   int _E1,
   int _E2
) const restrict(amp,cpu);

パラメーター

  • _E0
    このセクションの範囲の最上位のコンポーネント。

  • _E1
    このセクションの範囲の最上位の次のコンポーネント。

  • _E2
    このセクションの範囲の最下位のコンポーネント。

  • _Ext
    セクションの範囲を指定する extent オブジェクト。 原点は 0 です。

  • _Idx
    原点の位置を指定する index オブジェクト。 サブセクションは残りの範囲です。

  • _I0
    このセクションの原点の最上位のコンポーネント。

  • _I1
    このセクションの原点の最上位の次のコンポーネント。

  • _I2
    このセクションの原点の最下位のコンポーネント。

  • _Rank
    セクションのランク。

  • _Section_extent
    セクションの範囲を指定する extent オブジェクト。

  • _Section_origin
    原点の位置を指定する index オブジェクト。

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

戻り値

指定された原点にある array オブジェクトのサブセクションを返し、これは必要に応じて範囲が指定されます。 index オブジェクトのみを指定すると、サブセクションには index オブジェクトの要素のインデックスより大きなインデックスを持つ関連するグリッドのすべての要素が含まれます。

解説

このメソッドのオーバーロードによって、1、2、または 3 次元の array オブジェクトのサブセクションを作成することができます。

必要条件

ヘッダー: amp.h

名前空間: Concurrency

参照

関連項目

array クラス