array::operator[] 运算符

返回位于指定索引处的元素。

value_type& operator[] (
   const index<_Rank>& _Index
) restrict(amp,cpu);

const value_type& operator[] (
   const index<_Rank>& _Index
) const restrict(amp,cpu);

typename details::_Projection_result_type<_Value_type,_Rank>::_Result_type operator[](
   int _I
) restrict(amp,cpu);

typename details::_Projection_result_type<_Value_type,_Rank>::_Const_result_type operator[](
   int _I
) const restrict(amp,cpu);

参数

  • _Index
    索引。

  • _I
    索引。

返回值

指定索引处的元素。

要求

**标头:**amp.h

命名空间: 并发

请参见

参考

array 类