hpp-fcl: include/hpp/fcl/serialization/memory.h Source File

hpp-fcl 1.7.5 HPP fork of FCL -- The Flexible Collision Library

memory.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2021 INRIA
3 //
4
5 #ifndef HPP_FCL_SERIALIZATION_MEMORY_H
6 #define HPP_FCL_SERIALIZATION_MEMORY_H
7
8 namespace hpp {
9 namespace fcl {
10
11 namespace internal
12 {
13 template<typename T>
14 struct memory_footprint_evaluator
15 {
16 static size_t run(const T &) { return sizeof(T); }
17 };
18 }
19
26 template<typename T>
27 size_t computeMemoryFootprint(const T & object)
28 {
29 return internal::memory_footprint_evaluator<T>::run(object);
30 }
31
32 } // namespace fcl
33 } // namespace hpp
34
35 #endif // ifndef HPP_FCL_SERIALIZATION_MEMORY_H
hpp::fcl::computeMemoryFootprint
size_t computeMemoryFootprint(const T &object)
Returns the memory footpring of the input object. For POD objects, this function returns the result o...
Definition: memory.h:27
hpp
Main namespace.
Definition: AABB.h:44
hpp::fcl::internal::memory_footprint_evaluator
Definition: memory.h:15
hpp::fcl::internal::memory_footprint_evaluator::run
static size_t run(const T &)
Definition: memory.h:16