Urho3D/Source/ThirdParty/Tracy/common/TracyAlign.hpp
SuperWangKai 30a629ca21
Tracy profiler integration. (#2776)
* Tracy profiler integration.

* Cleanup URHO3D_TRACY_PROFILING macro.

* Fix comment of Tracy build option.

* Decouple URHO3D_TRACY_PROFILING exclusively from URHO3D_PROFILING.

* Comment explains URHO3D_TRACY_PROFILING

* Update

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update

* Update TracyCallstack.cpp

* Update

* Update CMakeLists.txt

* Update TracyCallstack.cpp

* Update TracyCallstack.cpp

Co-authored-by: 1vanK <1vanK@users.noreply.github.com>
2021-02-16 17:56:04 +03:00

28 lines
394 B
C++

#ifndef __TRACYALIGN_HPP__
#define __TRACYALIGN_HPP__
#include <string.h>
#include "TracyForceInline.hpp"
namespace tracy
{
template<typename T>
tracy_force_inline T MemRead( const void* ptr )
{
T val;
memcpy( &val, ptr, sizeof( T ) );
return val;
}
template<typename T>
tracy_force_inline void MemWrite( void* ptr, T val )
{
memcpy( ptr, &val, sizeof( T ) );
}
}
#endif