- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9
Extract the core logic of get_map_axes helper #337
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
Conversation
        
          
                common/src/KokkosFFT_transpose.hpp
              
                Outdated
          
        
      | KOKKOSFFT_THROW_IF(!KokkosFFT::Impl::are_valid_axes(view, axes), | ||
| "get_map_axes: input axes are not valid for the view"); | ||
|  | ||
| template <typename Layout, std::size_t DIM, typename iType, std::size_t FFT_DIM> | 
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.
Is the type parameter iType named in a manner that conforms to the rest of the code base?
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.
Currently, some of them are called IntType and others are called iType
Probably I will rename them IntType, before the release
        
          
                common/src/KokkosFFT_transpose.hpp
              
                Outdated
          
        
      | } | ||
|  | ||
| template <typename ViewType, std::size_t DIM> | ||
| auto get_map_axes(const ViewType& view, axis_type<DIM> axes) { | 
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.
Is axis_type<DIM> always of the form std::array<iType, DIM>?
Also, the name DIM that is used here has a different meaning to the DIM in the other function (it is ViewType::rank() in the other case).
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.
Is axis_type always of the form std::array<iType, DIM>?
yes, axis_type<DIM> is an alias to std::array<int, DIM>
OK, I will rename
| Could you show an example how a call to the following function can be made in the distributed case? Especially, how  Otherwise, the PR looks good to me. | 
| 
 Something like this This class does not have an access to  | 
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.
Looks good to me.
| Thanks! I will merge this | 
This PR aims at extracting the core logic of
get_map_axeswhich does not rely onView.For distributed FFT, we do not have an access to the global
Viewwhich does not necessarily exist.The extracted function can compute the mapping from the meta data of global
Viewrather thanViewitself.