fix some build warnings

This commit is contained in:
Mathias Agopian
2021-05-24 13:25:11 -07:00
committed by Mathias Agopian
parent cd01ad06fd
commit 3b59dff577
3 changed files with 6 additions and 21 deletions
+4 -20
View File
@@ -44,16 +44,8 @@ static void BM_trig(benchmark::State& state) noexcept {
{
PerformanceCounters pc(state);
for (auto _ : state) {
if (std::is_same<A, Vector>::value) {
#pragma clang loop vectorize(enable)
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
} else if (std::is_same<A, Scalar>::value) {
#pragma clang loop unroll(disable) vectorize(disable)
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
benchmark::ClobberMemory();
benchmark::DoNotOptimize(res);
@@ -81,16 +73,8 @@ static void BM_func(benchmark::State& state) noexcept {
{
PerformanceCounters pc(state);
for (auto _ : state) {
if (std::is_same<A, Vector>::value) {
#pragma clang loop vectorize(enable)
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
} else if (std::is_same<A, Scalar>::value) {
#pragma clang loop unroll(disable) vectorize(disable)
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
for (size_t i = 0, c = data.size(); i < c; i++) {
res[i] = f(data[i]);
}
benchmark::ClobberMemory();
benchmark::DoNotOptimize(res);