Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help the compiler vectorize adjacent_difference #4958

Merged
merged 27 commits into from
Oct 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
85a67ec
benchmark
AlexGuteniev Sep 14, 2024
b0bab69
test coverage
AlexGuteniev Sep 14, 2024
eb0cf5a
the optimization
AlexGuteniev Sep 14, 2024
eed039f
You shall pass!
AlexGuteniev Sep 14, 2024
bc92d54
constexpr
AlexGuteniev Sep 14, 2024
fd51080
ADL
AlexGuteniev Sep 14, 2024
3db07e7
rvalue
AlexGuteniev Sep 14, 2024
53a60d4
Review comments
AlexGuteniev Sep 14, 2024
51595a3
types
AlexGuteniev Sep 14, 2024
99e6058
Pointer math
AlexGuteniev Sep 19, 2024
869a0cc
Merge remote-tracking branch 'upstream/main' into adjacent
AlexGuteniev Oct 18, 2024
3cdbc88
std already
AlexGuteniev Oct 24, 2024
18f64ca
const
AlexGuteniev Oct 24, 2024
c68b402
oops loops
AlexGuteniev Oct 24, 2024
da4ef2b
Merge remote-tracking branch 'upstream/main' into adjacent
AlexGuteniev Oct 24, 2024
ba9a098
U
AlexGuteniev Oct 24, 2024
3ddaf9e
typos
AlexGuteniev Oct 24, 2024
944672b
includes
AlexGuteniev Oct 24, 2024
0042fe7
non-random filler
AlexGuteniev Oct 24, 2024
d06ea71
stray
AlexGuteniev Oct 25, 2024
df487ce
Merge branch 'main' into adjacent
StephanTLavavej Oct 26, 2024
f132d46
Test 8-bit and 16-bit, avoid truncation warnings.
StephanTLavavej Oct 26, 2024
cfb92a4
static_assert: The documentation that rewards poor reading comprehens…
StephanTLavavej Oct 26, 2024
c2a130f
Consistently order output_expected before output_actual.
StephanTLavavej Oct 26, 2024
7a110a8
Minor comment grammar improvements.
StephanTLavavej Oct 26, 2024
d86bf29
Fix perf bug: Inspect unwrapped iterators with `_Iterators_are_contig…
StephanTLavavej Oct 26, 2024
9b85627
Fix and test adjacent_difference with heterogeneous types.
StephanTLavavej Oct 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
const
AlexGuteniev committed Oct 24, 2024
commit 18f64cabaa75fe8ae446c5f4166f3fbf9adb1d7a
4 changes: 2 additions & 2 deletions tests/std/tests/VSO_0000000_vector_algorithms/test.cpp
Original file line number Diff line number Diff line change
@@ -55,8 +55,8 @@ OutIt last_known_good_adj_diff(InIt first, InIt last, OutIt dest) {

template <class T>
void test_case_adj_diff(const vector<T>& input, vector<T>& output_expected, vector<T>& output_actual) {
auto actual = adjacent_difference(input.begin(), input.end(), output_actual.begin());
auto expected = last_known_good_adj_diff(input.begin(), input.end(), output_expected.begin());
const auto actual = adjacent_difference(input.begin(), input.end(), output_actual.begin());
const auto expected = last_known_good_adj_diff(input.begin(), input.end(), output_expected.begin());

assert(actual - output_actual.begin() == expected - output_expected.begin());
assert(output_actual == output_expected);