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) __GPU;
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);
auto operator()(int _I) restrict(amp,cpu) -> decltype(details::_Array_projection_helper<_Value_type,_Rank>::_Project0((array<_Value_type,_Rank> *)NULL,_I));
auto operator()(int _I) const restrict(amp,cpu) -> decltype(details::_Array_projection_helper<_Value_type,_Rank>::_Project0((const array<_Value_type,_Rank> *)NULL,_I));
参数
_Index
元素的位置。_I0
本部分的起点的最重要的组件。_I1
本部分的起点的下一步-到-最高有效的组件。_I2
本部分的起点的最不重要的组件。_I
元素的位置。
返回值
指定参数的元素值。
备注
重载的I0, I1,或I2参数使您可以检索参照中的值数组而无需创建索引对象。
要求
标题: amp.h
命名空间: 并发