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

**命名空間:**並行

請參閱

參考

array 類別