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

Feature/simd load #1018

Closed
wants to merge 2 commits into from
Closed

Feature/simd load #1018

wants to merge 2 commits into from

Conversation

rrahn
Copy link
Contributor

@rrahn rrahn commented May 24, 2019

Adds load function for simd.

Tested with sse4, avx2 and avx512.

@rrahn rrahn requested a review from marehr May 24, 2019 13:43
@rrahn rrahn force-pushed the feature/simd_load branch from fbcb419 to 77b8752 Compare May 24, 2019 15:30
@codecov
Copy link

codecov bot commented May 24, 2019

Codecov Report

Merging #1018 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1018      +/-   ##
==========================================
+ Coverage   96.42%   96.42%   +<.01%     
==========================================
  Files         185      185              
  Lines        6714     6717       +3     
==========================================
+ Hits         6474     6477       +3     
  Misses        240      240
Impacted Files Coverage Δ
include/seqan3/core/simd/simd_algorithm.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9c318e...77b8752. Read the comment docs.

@rrahn
Copy link
Contributor Author

rrahn commented May 28, 2019

@marehr can u review this?

Copy link
Member

@marehr marehr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

else if constexpr (simd_traits<simd_t>::max_length == 1) // scalar value?
return simd_t{*reinterpret_cast<simd_t const *>(mem_addr)};
else
static_assert(simd_traits<simd_t>::max_length >= 1 && simd_traits<simd_t>::max_length,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simd_traits<simd_t>::max_length is weird.

using simd_type = simd_type_t<int16_t>;

std::array<int16_t, simd_traits<simd_type>::length> mem{};
simd_type expect{};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
simd_type expect{};
simd_type expect = iota<simd_type>(0);

for (int16_t i = 0; i < static_cast<int16_t>(mem.size()); ++i)
{
mem[i] = i;
expect[i] = i;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect[i] = i;

@rrahn
Copy link
Contributor Author

rrahn commented Aug 8, 2019

superseded by #1190

@rrahn rrahn closed this Aug 8, 2019
@rrahn rrahn deleted the feature/simd_load branch January 16, 2020 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants