MCPcopy Create free account
hub / github.com/USCiLab/cereal / loadData

Function loadData

sandbox/performance.cpp:81–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 @return The loaded data and the time it took to save the data */
80template <class T>
81std::pair<T, std::chrono::nanoseconds>
82loadData( std::ostringstream const & dataStream, std::function<void(std::istringstream &, T &)> loadFunction )
83{
84 T data;
85 std::istringstream os( dataStream.str() );
86
87 auto start = std::chrono::high_resolution_clock::now();
88 loadFunction( os, data );
89
90 return {data, std::chrono::duration_cast<std::chrono::nanoseconds>( std::chrono::high_resolution_clock::now() - start )};
91}
92
93struct cerealBinary
94{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected