#include "tests/AssetsLibrary.h"
#include "utils/Utils.h"
#include <chrono>
#include <limits>
#include <type_traits>
Go to the source code of this file.
|
#define | TICK(clock_name) auto clock_name##_tick = std::chrono::high_resolution_clock::now(); |
| A pair of macros which measures the wall clock time, and records it into a map measurement_map with name clock_name. More...
|
|
#define | TOCK(clock_name, measurement_map) |
|
#define | TOCK_AVG(clock_name, measurement_map, num_iterations) |
|
|
template<typename T , typename U > |
void | fill (U &&tensor, int seed, AssetsLibrary *library) |
|
◆ TICK
#define TICK |
( |
|
clock_name | ) |
auto clock_name##_tick = std::chrono::high_resolution_clock::now(); |
A pair of macros which measures the wall clock time, and records it into a map measurement_map with name clock_name.
Definition at line 46 of file Utils.h.
◆ TOCK
#define TOCK |
( |
|
clock_name, |
|
|
|
measurement_map |
|
) |
| |
Value: auto clock_name##_tock = std::chrono::high_resolution_clock::now(); \
measurement_map["\"" #clock_name "\""] = duration_cast<microseconds>(clock_name##_tock - clock_name##_tick);
Definition at line 48 of file Utils.h.
◆ TOCK_AVG
#define TOCK_AVG |
( |
|
clock_name, |
|
|
|
measurement_map, |
|
|
|
num_iterations |
|
) |
| |
Value: auto clock_name##_tock = std::chrono::high_resolution_clock::now(); \
measurement_map["\"" #clock_name "\""] = duration_cast<microseconds>((clock_name##_tock - clock_name##_tick) / (num_iterations));
Definition at line 51 of file Utils.h.