Template Function Pennylane::Util::PL_reinterpret_cast(const SrcType *)¶
Defined in File Util.hpp
Function Documentation¶
-
template<typename DestType, typename SrcType>
inline auto Pennylane::Util::PL_reinterpret_cast(const SrcType *src_ptr) -> const DestType*¶ Helper function to safely reinterpret const data pointers.
This function assumes that DestType and SrcType have compatible memory layouts
- Template Parameters
DestType – Destination type
SrcType – Source type
- Parameters
src_ptr – Pointer to source data
- Returns
const DestType* Reinterpreted pointer to the same data
api/function_Util_8hpp_1a3813df560da54a7cb6407d0ede6a70d0
Download Python script
Download Notebook
View on GitHub