parent
e5e4bcb9c3
commit
066627f5e2
@ -1,3 +1,6 @@
|
||||
cmake_minimum_required (VERSION 3.10)
|
||||
project (PerformanceMeasuring)
|
||||
add_executable(performance_measuring main.cpp)
|
||||
|
||||
set(HEADER_FILES dummy_lib.hpp)
|
||||
|
||||
add_executable(performance_measuring main.cpp ${HEADER_FILES})
|
||||
|
@ -0,0 +1,17 @@
|
||||
#ifndef DUMMY_LIB_HPP
|
||||
#define DUMMY_LIB_HPP
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
|
||||
namespace performance_measuring {
|
||||
|
||||
int compute(const std::vector<int>& v)
|
||||
{
|
||||
int min = *std::min_element(v.begin(), v.end());
|
||||
return std::count(v.begin(), v.end(), min);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Reference in new issue