Skip to content

Commit

Permalink
fixup! Rebase on benchmark prototype branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sdebionne committed Feb 24, 2023
1 parent b6ba236 commit 9398fd9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
7 changes: 5 additions & 2 deletions benchmark/google/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ set_property(TARGET gil_googlebenchmark PROPERTY IMPORTED_LOCATION
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
find_library(SHLWAPI Shlwapi.lib)
target_link_libraries(gil_googlebenchmark INTERFACE SHLWAPI)
else()
find_package(Threads)
target_link_libraries(gil_googlebenchmark INTERFACE ${CMAKE_THREAD_LIBS_INIT} rt)
endif()

add_dependencies(gil_googlebenchmark project_googlebenchmark)
Expand All @@ -41,9 +44,9 @@ add_dependencies(gil_googlebenchmark project_googlebenchmark)
# Build benchmarks
#-----------------------------------------------------------------------------
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
file(GLOB_RECURSE _benchmarks ${CMAKE_CURRENT_LIST_DIR}/*.cpp CONFIGURE_DEPEND)
file(GLOB _benchmarks ${CMAKE_CURRENT_LIST_DIR}/*.cpp CONFIGURE_DEPEND)
else()
file(GLOB_RECURSE _benchmarks ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
file(GLOB _benchmarks ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
endif()

foreach(_benchmark ${_benchmarks})
Expand Down
4 changes: 2 additions & 2 deletions benchmark/google/blaze/view_transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static void blaze_transpose(benchmark::State& state)
mat_out = blaze::trans(mat_in);
}

if (!equal_pixels(transposed_view(const_view(in)), const_view(in))))
if (!equal_pixels(transposed_view(const_view(in)), const_view(in)))
state.SkipWithError("blaze_transpose wrong result");
}
BENCHMARK(blaze_transpose)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand All @@ -63,7 +63,7 @@ static void blaze_transpose_inplace(benchmark::State& state)
blaze::transpose(mat_in_out);
}

if (!equal_pixels(transposed_view(const_view(in_ref)), const_view(in))))
if (!equal_pixels(transposed_view(const_view(in_ref)), const_view(in)))
state.SkipWithError("blaze_transpose_inplace wrong result");
}
BENCHMARK(blaze_transpose_inplace)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand Down
8 changes: 4 additions & 4 deletions benchmark/google/ipp/view_flip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void ipp_flip_left_right(benchmark::State& state)
ippAxsVertical);
}

if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(out))))
if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(out)))
state.SkipWithError("ipp_flip_left_right wrong result");
}
BENCHMARK(ipp_flip_left_right)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand All @@ -56,7 +56,7 @@ static void ipp_flip_left_right_inplace(benchmark::State& state)
ippAxsVertical);
}

if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(in_ref))))
if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(in_ref)))
state.SkipWithError("ipp_flip_left_right_inplace wrong result");
}
BENCHMARK(ipp_flip_left_right_inplace)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand All @@ -82,7 +82,7 @@ static void ipp_flip_up_down(benchmark::State& state)
ippAxsHorizontal);
}

if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(out))))
if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(out)))
state.SkipWithError("ipp_flip_up_down wrong result");
}
BENCHMARK(ipp_flip_up_down)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand All @@ -107,7 +107,7 @@ static void ipp_flip_up_down_inplace(benchmark::State& state)
ippAxsHorizontal);
}

if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(in_ref))))
if (!equal_pixels(flipped_left_right_view(const_view(in)), const_view(in_ref)))
state.SkipWithError("ipp_flip_up_down_inplace wrong result");
}
BENCHMARK(ipp_flip_up_down_inplace)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand Down
4 changes: 2 additions & 2 deletions benchmark/google/ipp/view_transpose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static void ipp_transpose(benchmark::State& state)
srcRoi);
}

if (!equal_pixels(transposed_view(const_view(in)), const_view(out))))
if (!equal_pixels(transposed_view(const_view(in)), const_view(out)))
state.SkipWithError("ipp_transpose wrong result");
}
BENCHMARK(ipp_transpose)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand All @@ -54,7 +54,7 @@ static void ipp_transpose_inplace(benchmark::State& state)
srcRoi);
}

if (!equal_pixels(transposed_view(const_view(in_ref)), const_view(in))))
if (!equal_pixels(transposed_view(const_view(in_ref)), const_view(in)))
state.SkipWithError("ipp_transpose_inplace wrong result");
}
BENCHMARK(ipp_transpose_inplace)->RangeMultiplier(2)->Range(256, 8 << 10);
Expand Down

0 comments on commit 9398fd9

Please sign in to comment.