X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2FAPI%2Fcommon_8cpp.html;fp=docs%2FAPI%2Fcommon_8cpp.html;h=b68563efeff3db6cce07281f384393f8839e64bb;hb=870e1b86b0c74169b215c166dee787c7c1a20d06;hp=0000000000000000000000000000000000000000;hpb=298022ce50fa8133cc880507170c4b7120d227b5;p=o-du%2Fphy.git diff --git a/docs/API/common_8cpp.html b/docs/API/common_8cpp.html new file mode 100644 index 0000000..b68563e --- /dev/null +++ b/docs/API/common_8cpp.html @@ -0,0 +1,447 @@ + + +
+ + + + +
+ o-du/phy
+
+ Intel O-RAN/X-RAN Generated Doxygen Documentation
+ |
+
#include <cmath>
#include <fstream>
#include <numeric>
#include <unistd.h>
#include <sys/syscall.h>
#include "common.hpp"
Go to the source code of this file.
++Macros | |
#define | CPU_ID 4 |
+Functions | |
int | bind_to_cpu (const unsigned cpu) |
Attach current process to the selected core. More... | |
std::pair< double, double > | calculate_statistics (const std::vector< long > values) |
Calculate the mean and variance from the result of the run_benchmark. More... | |
std::vector< unsigned > | get_sequence (const unsigned number) |
For a given number return sequence of number from 0 to number - 1. More... | |
char * | read_data_to_aligned_array (const std::string &filename) |
Read binary data from the file. More... | |
json | read_json_from_file (const std::string &filename) |
Read JSON from the given file. More... | |
unsigned long | tsc_recovery () |
Measure the TSC on the machine. More... | |
unsigned long | tsc_tick () |
Return the current value of the TSC. More... | |
#define CPU_ID 4 | +
Definition at line 34 of file common.cpp.
+ +int bind_to_cpu | +( | +const unsigned | +cpu | ) | ++ |
Attach current process to the selected core.
+[in] | cpu | Core number. |
Definition at line 47 of file common.cpp.
+std::pair<double, double> calculate_statistics | +( | +const std::vector< long > | +values | ) | ++ |
Calculate the mean and variance from the result of the run_benchmark.
+[in] | values | Vector with result values. |
Definition at line 60 of file common.cpp.
+std::vector<unsigned> get_sequence | +( | +const unsigned | +number | ) | ++ |
For a given number return sequence of number from 0 to number - 1.
+[in] | number | Positive integer value. |
Definition at line 78 of file common.cpp.
+char* read_data_to_aligned_array | +( | +const std::string & | +filename | ) | ++ |
Read binary data from the file.
+[in] | filename | name of the binary file. |
std::runtime_error | when memory cannot be allocated. |
Definition at line 86 of file common.cpp.
+json read_json_from_file | +( | +const std::string & | +filename | ) | ++ |
Read JSON from the given file.
+[in] | filename | name of the .json file. |
missing_config_file_exception | when file cannot be opened. |
Definition at line 106 of file common.cpp.
+unsigned long tsc_recovery | +( | +) | ++ |
Measure the TSC on the machine.
+Definition at line 119 of file common.cpp.
+unsigned long tsc_tick | +( | +) | ++ |
Return the current value of the TSC.
+Definition at line 162 of file common.cpp.
+