Skip to content

Commit

Permalink
Improve bench structure (agenium-scale#350)
Browse files Browse the repository at this point in the history
* Update ns.bench + Uniformize `describe` header + is_quiet

* Add DEFINE_UNROLLED_SIMD_BENCH bench macro

This can be refactored a bit.

* Update ns.bench

* bench: scalar_ -> simd_

* Add extension name into ns.bench optional infos

* Finally remove ns.bench from ns.cmake's projects

If updates are needed, we can still update ns.bench manually
  • Loading branch information
ccharly authored Dec 21, 2016
1 parent f68cc32 commit eac623f
Show file tree
Hide file tree
Showing 6 changed files with 446 additions and 118 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ NS_prevent_in_source_build()
## -------------------------------------------------------------------------------------------------
set(STF_STANDALONE_DESTINATION ${PROJECT_SOURCE_DIR}/test)
set(BRIGAND_STANDALONE_DESTINATION ${PROJECT_SOURCE_DIR}/include/boost/simd/detail)
set(NS_BENCH_STANDALONE_DESTINATION ${PROJECT_SOURCE_DIR}/bench)

set(NS_CMAKE_PROJECT_OPTIONS
CMAKE_ARGS "-DBOOST_ROOT=${BOOST_HEADER_ONLY_DESTINATION}/include"
Expand All @@ -67,9 +66,7 @@ set(NS_CMAKE_PROJECT_OPTIONS
)

if (DEFINED DEV)
set(NS_BENCH_GIT_TAG develop)
set(BRIGAND_GIT_TAG 1.2.0)
NS_project_include(ns.bench.standalone)
NS_project_include(brigand.standalone)
NS_project_include(stf.standalone)
endif()
Expand Down
8 changes: 4 additions & 4 deletions bench/function/simd/shift_left.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ struct shlN
}
};

DEFINE_SIMD_BENCH(scalar_shift_left1, shlN<1>());
DEFINE_SIMD_BENCH(scalar_shift_left2, shlN<2>());
DEFINE_SIMD_BENCH(simd_shift_left1, shlN<1>());
DEFINE_SIMD_BENCH(simd_shift_left2, shlN<2>());

DEFINE_BENCH_MAIN()
{
nsb::for_each<scalar_shift_left1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<scalar_shift_left2, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shift_left1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shift_left2, NS_BENCH_IEEE_TYPES>(-10, 10);
}
8 changes: 4 additions & 4 deletions bench/function/simd/shift_right.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ struct shlN
}
};

DEFINE_SIMD_BENCH(scalar_shift_right1, shlN<1>());
DEFINE_SIMD_BENCH(scalar_shift_right2, shlN<2>());
DEFINE_SIMD_BENCH(simd_shift_right1, shlN<1>());
DEFINE_SIMD_BENCH(simd_shift_right2, shlN<2>());

DEFINE_BENCH_MAIN()
{
nsb::for_each<scalar_shift_right1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<scalar_shift_right2, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shift_right1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shift_right2, NS_BENCH_IEEE_TYPES>(-10, 10);
}
8 changes: 4 additions & 4 deletions bench/function/simd/shr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ struct shlN
}
};

DEFINE_SIMD_BENCH(scalar_shr1, shlN<1>());
DEFINE_SIMD_BENCH(scalar_shr2, shlN<2>());
DEFINE_SIMD_BENCH(simd_shr1, shlN<1>());
DEFINE_SIMD_BENCH(simd_shr2, shlN<2>());

DEFINE_BENCH_MAIN()
{
nsb::for_each<scalar_shr1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<scalar_shr2, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shr1, NS_BENCH_IEEE_TYPES>(-10, 10);
nsb::for_each<simd_shr2, NS_BENCH_IEEE_TYPES>(-10, 10);
}
Loading

0 comments on commit eac623f

Please sign in to comment.