thrust::raw_reference_cast

Defined in thrust/memory.h

template<typename T>
detail::raw_reference<const T>::type thrust::raw_reference_cast(const T &ref)

raw_reference_cast creates a “raw” reference from a wrapped reference type, simply returning the underlying reference, should it exist.

If the argument is not a reference wrapper, the result is a reference to the argument.

See also

raw_pointer_cast

Note

There are two versions of raw_reference_cast. One for const references, and one for non-const.

Parameters

ref – The reference of interest.

Returns

*thrust::raw_pointer_cast(&ref).