Share via


array_view::get_ref Method

Get a reference to the element indexed by _Index. Unlike the other indexing operators for accessing the array_view on the CPU, this method does not implicitly synchronize this array_view's contents to the CPU. After accessing the array_view on a remote location or performing a copy operation involving this array_view users are responsible to explicitly synchronize the array_view to the CPU before calling this method. Failure to do so results in undefined behavior.

value_type& get_ref(
   const index<_Rank>& _Index
) const restrict(amp, cpu);

Parameters

  • _Index
    The index.

Return Value

Reference to the element indexed by _Index

Requirements

Header: amp.h

Namespace: concurrency

See Also

Reference

array_view Class