Share via


array::operator() Operator

Returns the element value that is specified by the parameters.

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));

Parameters

  • _Index
    The location of the element.

  • _I0
    The most significant component of the origin of this section.

  • _I1
    The next-to-most-significant component of the origin of this section.

  • _I2
    The least significant component of the origin of this section.

  • _I
    The location of the element.

Return Value

The element value specified by the parameters.

Remarks

The overloads that have I0, I1, or I2 parameters enable you to retrieve references to values in the array without having to create an index object.

Requirements

Header: amp.h

Namespace: Concurrency

See Also

Reference

array Class