array::operator() 运算符

返回参数指定的元素值。

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

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

value_type& operator() (int _I0, int _I1) restrict(amp,cpu);

const value_type& operator() (int _I0, int _I1) const restrict(amp,cpu);

value_type& operator() (int _I0, int _I1, int _I2) restrict(amp,cpu);

const value_type& operator() (int _I0, int _I1, int _I2) 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
    元素的位置。

  • _I0
    本节原点的最高有效组件。

  • _I1
    本节原点的接近最高有效组件。

  • _I2
    本节原点的最低有效组件。

  • _I
    元素的位置。

返回值

由参数指定的元素值。

备注

具有 I0、I1或 I2 参数的重载使您可以检索数组引用值,而不必创建索引对象。

要求

**标头:**amp.h

命名空间: 并发

请参见

参考

array 类