Template Function Pennylane::Util::PL_reinterpret_cast(SrcType *)¶
Defined in File Util.hpp
Function Documentation¶
-
template<typename DestType, typename SrcType>
inline auto Pennylane::Util::PL_reinterpret_cast(SrcType *src_ptr) -> DestType*¶ Helper function to safely reinterpret non-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
DestType* Reinterpreted pointer to the same data
api/function_Util_8hpp_1a4dbdc61389ef7233192a62a702b19f5d
Download Python script
Download Notebook
View on GitHub