- 
                Notifications
    You must be signed in to change notification settings 
- Fork 9
Copy if map is identical in transpose helper #345
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/unit_test/Test_Transpose.cpp
              
                Outdated
          
        
      | std::size_t dst_i0 = (map[0] == 1) ? i1 | ||
| : (map[0] == 2) ? i2 | ||
| : (map[0] == 3) ? i3 | ||
| : (map[0] == 4) ? i4 | ||
| : (map[0] == 5) ? i5 | ||
| : (map[0] == 6) ? i6 | 
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.
This is not related to this PR.
Maybe you should have an array std::size_t idx[7], that you'd use to iterate over idx[0], idx[1], ...
An other array std::size_t dst_idx[7]
And then, you could write
for (int i=0; i<7;++i) {
  dst_idx[i] = idx[map[i]];
}
And maybe you could use a recursive template for the 7 and put the whole loop in a function that could be reused across all the dimensions?
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.
The changes in KokkosFFT_transpose.hpp looks correct, but the test file is so big that it is becoming hard to review, it would be best if you could find a way to factorise some of the code to make the changes easier to track.
It is orthogonal with the work done in this PR though.
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 @PaulGannay @tretre91 | 
| @PaulGannay I opened #348 focusing on the execution space instance. Can I have your review please. | 
| @PaulGannay I opened #349 to make reference transposed view simpler. Actually, I encountered an issue with this change alone. The failed test is skipped now. Can I have your review please. | 
af5d2a7    to
    fbb74ae      
    Compare
  
    | Hi, I have rebased after PRs #348 and #349 | 
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.
LGTM
| Thanks! I will merge this | 
This PR aims at allowing transpose function to perform
deep_copyif transpose is not needed.fftshifttests inReleasebuild onCudabackend. This does not happen in CPU backends or Cuda backend withDebugbuild. This happens only with 4D cases.