Dela via


array::view_as Method

Returns an array_view object that is constructed from the array object.

template <
   int _New_rank                     
>
array_view<_Value_type,_New_rank> view_as(
   const Concurrency::extent<_New_rank>& _View_extent                     
) restrict(amp,cpu);
                     
template <
   int _New_rank                     
>
array_view<const _Value_type,_New_rank> view_as(
   const Concurrency::extent<_New_rank>& _View_extent                     
) const restrict(amp,cpu);

Parameters

  • _New_rank
    The rank of the extent object passed as a parameter.

  • _View_extent
    The extent that is used to construct the new array_view object.

  • _Value_type
    The data type of the elements in the array object.

Return Value

The array_view object that is constructed.

Requirements

Header: amp.h

Namespace: Concurrency

See Also

Reference

array Class