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