From b6186ecbfdd4783ff0c86771b8be9962e000d041 Mon Sep 17 00:00:00 2001 From: "James D. Mitchell" Date: Fri, 17 Jan 2020 16:16:46 +0100 Subject: [PATCH] Fix issue #12 --- benchmark/CMakeLists.txt | 4 ++++ include/vect16.hpp | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index fa3242de..d0a43bad 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -13,6 +13,8 @@ # http://www.gnu.org/licenses/ # #****************************************************************************# +find_package(PkgConfig REQUIRED) +pkg_check_modules(BENCHMARK REQUIRED IMPORTED_TARGET benchmark) include_directories( ${CMAKE_SOURCE_DIR}/include @@ -24,6 +26,8 @@ set(benchmark_src foreach(f ${benchmark_src}) get_filename_component(benchName ${f} NAME_WE) add_executable (${benchName} ${f}) + target_include_directories(${benchName} PUBLIC ${BENCHMARK_INCLUDE_DIRS}) + target_compile_options(${benchName} PUBLIC ${BENCHMARK_CFLAGS_OTHER}) target_link_libraries(${benchName} benchmark pthread) # install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${benchName} # DESTINATION bin diff --git a/include/vect16.hpp b/include/vect16.hpp index 06e43181..880e44a7 100644 --- a/include/vect16.hpp +++ b/include/vect16.hpp @@ -67,9 +67,15 @@ struct alignas(16) Vect16 { using iterator = typename array::iterator; using const_iterator = typename array::const_iterator; + const_iterator cbegin() const { return as_array().begin(); } + const_iterator cend() const { return as_array().end(); } + iterator begin() { return as_array().begin(); } iterator end() { return as_array().end(); } + const_iterator begin() const { return as_array().begin(); } + const_iterator end() const { return as_array().end(); } + bool operator==(const Vect16 &b) const { return HPCombi::equal(v, b.v); }; bool operator!=(const Vect16 &b) const { return HPCombi::not_equal(v, b.v);