Skip to content

Commit 8f25453

Browse files
Force alignment of an aligned test
1 parent e0a09cd commit 8f25453

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

test/test_api.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct xsimd_api_test
138138
batch_type b = batch_type::load(v.data(), xsimd::aligned_mode());
139139
V res(size);
140140

141-
bool* b_data = new bool[size];
141+
alignas(arch_type::alignment()) bool b_data[size];
142142

143143
xsimd::store_as(res.data(), b, xsimd::unaligned_mode());
144144
INFO(name, " unaligned");
@@ -159,8 +159,6 @@ struct xsimd_api_test
159159
xsimd::store_as(b_data, bb, xsimd::aligned_mode());
160160
INFO(name, " batch_bool aligned");
161161
CHECK_UNARY(std::accumulate(b_data, b_data + size, true, std::logical_and<bool>()));
162-
163-
delete[] b_data;
164162
}
165163

166164
template <class T>

0 commit comments

Comments
 (0)