Skip to content

Conversation

@sbacchio
Copy link
Member

This is a (partial) implementation of shifting for gauge field. The CPU kernel is missing, but in light of the unification of cpuGaugeField and cudaGaugeField, I would avoid implementing it.

@sbacchio sbacchio requested review from a team as code owners January 13, 2023 07:08
Copy link
Member

@maddyscientist maddyscientist left a comment

Choose a reason for hiding this comment

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

Looks mostly good.

  • How about a unit test for this?
  • Will need a clang format
  • Also see my inline comments

* @param[in] srd Source from which we are shifting (extended field in case of MPI)
* @param[in] dx Host array of shifts to apply to the field
*/
void gaugeShift(GaugeField &dst, const GaugeField &src, const array<int, 4> &dx);
Copy link
Member Author

Choose a reason for hiding this comment

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

Should this be moved to e.g. gauge_tools.h?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, that seems like a consistent place for it.

@sbacchio
Copy link
Member Author

@maddyscientist thank you for the review. I applied the suggested changes and run clang format via git-clang-format (hopefully the right way).

Only the unit testing would be missing. Could you please point me to one of the current tests to extend / base it on?

@maddyscientist
Copy link
Member

maddyscientist commented Jan 27, 2023

@maddyscientist thank you for the review. I applied the suggested changes and run clang format via git-clang-format (hopefully the right way).

Looks good I think.

Only the unit testing would be missing. Could you please point me to one of the current tests to extend / base it on?

I guess the easiest one to hack from as a base is plaq_test. It's not quite what you want since this proposed test would be done using native QUDA types rather through the interface.

The bigger question is what the test would consist of. Some ideas, OTOH:

  • check that the plaquette is invariant after shifting
  • check that performing a closed loop of shifts leads to a bitwise identical guage field to the initial field

Anything else come to mind?

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.

3 participants