-
Notifications
You must be signed in to change notification settings - Fork 60
Made load a new format callable #2106
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
base: main
Are you sure you want to change the base?
Conversation
a5ffc3c
to
c71d6fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
algo changes look OK. THe load itself - didn't look yet.
Notes: There's now the following functions :
A generic |
9777c53
to
7e7c693
Compare
|
||
template<> struct supports_optimized_conversion<tag::load_> : std::true_type {}; | ||
template<detail::data_source Ptr, std::ptrdiff_t N> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
concepts using detail is ofc not awesome, but this is not for you.
include/eve/detail/function/load.hpp
Outdated
//================================================================================================ | ||
//! @addtogroup simd | ||
//! @{ | ||
//! @var load |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfalcou - docs in detail. Will they be rendered?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to move it to the non detail place like for bit_cast.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@@ -6,95 +6,4 @@ | |||
//================================================================================================== | |||
#pragma once | |||
|
|||
#include <eve/arch.hpp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe actual load should be in this file instead of detail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is this way cause of our adage of having the basics of wide, etc, not depending on the module/core. When everything settles on this front, we can revisit that. Also, the doc should be here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
} | ||
else | ||
{ | ||
return piecewise_load(src, tgt); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my sanity - where is the assert that there is enough space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean a check to ensure that every element in the [b, e) range fits in the logical register ? There was previously no checks for that. I also suspect that the second iterator was only used to differentiate the implementation for the standard one as it has never been used, or so it seems.
{ | ||
return load(ignore_none, safe, as<Wide>{}, b, e); | ||
if constexpr (logical_simd_value<Wide> && !Wide::abi_type::is_wide_logical) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some confusion here.
This code is duplicated between this overload and the next overload.
Should be unified for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really, the iterator path always end up calling piecewise_load
whereas the logical path could have arch-specific backends.
return aggregate_load(tgt,ptr); | ||
if constexpr (!std::is_pointer_v<DS>) | ||
{ | ||
constexpr bool is_aligned_enough = c_t() * sizeof(e_t) >= DS::alignment(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm so confused to what;'s happening.
DS is data_source. We use that in the API of load. Here we call ::alignmetn on it. We obv can't do that for pointers. What's happening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well there's a !std::is_pointer_v<DS>
check right before the call to alignment
fe19266
to
975a766
Compare
e9e94be
to
4b6877f
Compare
No description provided.