Merge branch 'master' into refac/memory
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
|
||||
INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
|
||||
INCLUDE_DIRECTORIES("${CMAKE_BINARY_DIR}")
|
||||
|
||||
SET(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
SET(CMAKE_AUTOMOC ON)
|
||||
|
||||
ADD_EXECUTABLE(benchmarks
|
||||
EXCLUDE_FROM_ALL
|
||||
benchmark.cpp
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(benchmarks lmmslib)
|
||||
|
||||
# TODO replace usages of include_directories in src/CMakeLists.txt with target_include_directories
|
||||
# and remove this line (also in tests/CMakeLists.txt)
|
||||
target_include_directories(benchmarks PRIVATE $<TARGET_PROPERTY:lmmsobjs,INCLUDE_DIRECTORIES>)
|
||||
|
||||
target_static_libraries(benchmarks PRIVATE lmmsobjs)
|
||||
target_compile_features(benchmarks PRIVATE cxx_std_17)
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "NotePlayHandle.h"
|
||||
|
||||
using namespace lmms;
|
||||
|
||||
template<typename T>
|
||||
using LocklessQueue = cds::container::VyukovMPMCCycleQueue<T>;
|
||||
|
||||
@@ -116,7 +118,6 @@ int main(int argc, char* argv[])
|
||||
constexpr size_t S = 256;
|
||||
using T = std::array<char, S>;
|
||||
benchmark_allocator("std::allocator", std::allocator<T>{}, n, 1);
|
||||
benchmark_allocator("MmAllocator", MmAllocator<T>{}, n, 1);
|
||||
benchmark_allocator("MemoryPool", MemoryPool<T>{n}, n, 1);
|
||||
}
|
||||
{
|
||||
@@ -124,7 +125,6 @@ int main(int argc, char* argv[])
|
||||
constexpr size_t S = 256;
|
||||
using T = std::array<char, S>;
|
||||
benchmark_allocator_threaded("std::allocator", std::allocator<T>{}, n, 4);
|
||||
benchmark_allocator_threaded("MmAllocator", MmAllocator<T>{}, n, 4);
|
||||
benchmark_allocator_threaded("MemoryPool", MemoryPool<T>{n}, n, 4);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user