Bonjour,

Quelqu'un peut-il m'expliquer le code suivant :
Merci.


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define CHECK_TIME(v, t, f, ...) \
{ \
std::string name = BOOST_PP_STRINGIZE(f); \
clock_t diff = clock();f(__VA_ARGS__); diff = clock() - diff; \
double cmp = ((double) diff / (double) CLOCKS_PER_SEC); \
std::ostringstream oss; oss << cmp; \
std::string msg = "Time execution of " + name + " : " + oss.str() + " sec"; \
BOOST_TEST_MESSAGE(msg); \
BOOST_CHECK_CLOSE(v, cmp, t/v*100); \
}
 
// Compare checksum method
bool compare_checksum(const std::string obtained_repertory,
                      const std::string expected_repertory,
                      const std::string file);
 
bool compare_checksum(const std::string file1, const std::string file2);
 
std::set<std::string> retrieve_all_files(const std::string directory);
 
#endif