Share via


array::view_as Method

Reinterprets this array as an array_view of a different rank.

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 both the original array object and the returned array_view object.

Return Value

The array_view object that is constructed.

Requirements

Header: amp.h

Namespace: Concurrency

See Also

Reference

array Class