-
Notifications
You must be signed in to change notification settings - Fork 144
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
templatizing SPOSet
#5306
templatizing SPOSet
#5306
Conversation
Test this please |
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.
Would like to see naming of the type aliases consistent with the coding standards and consistent with the aliases for the container types.
Otherwise this looks good to me.
@@ -576,6 +589,7 @@ class SPOSet : public QMCTraits | |||
IndexType OrbitalSetSize; | |||
}; | |||
|
|||
using SPOSet = SPOSetT<QMCTraits::QTBase::ValueType>; | |||
using SPOSetPtr = SPOSet*; |
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 some reason I have a reflexive dislike of the SPOSetT
naming and this alias trick to reduce the code change ripple. But I am accepting it because I think the reduction of files to review and improved readability everywhere the underlying type of SPOSet doesn't matter makes up for it.
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.
That is temporary renaming to minimize code change for an easy review. Once we touch the consumers of SPOSet. SPOSetT will be renamed back to SPOSet.
DIM = OHMMS_DIM, | ||
DIM_VGL = OHMMS_DIM + 2 // Value(1) + Gradients(OHMMS_DIM) + Laplacian(1) | ||
}; | ||
using ValueType = T; |
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.
As always I am not a fan of the redundant xxxType
naming of type aliases and types. I'm glad to see FullPrecRealType at least dropped this. But if the ripple isn't excessive can we drop the redundant Type suffix where ever possible. I have been trying to do it when I touch code where it is possible.
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.
ValueType
cannot be changed due to the used in derived classes. That change requires a giant renaming PR which distract the intention of this PR to focus on adjust the base class only. When touching derived classes, Value
can be introduced parallel to ValueType
once we finished going through all derived classes, ValueType
can be removed eventually.
Q. Why did only SplineR2R.cpp need to be touched at this stage, and not (say) C2C? |
It is an inconsistency between R2R and C2C implementation.
Will PR to address that. Prefer changing the C2C side. |
Please review the developer documentation
on the wiki of this project that contains help and requirements.
Proposed changes
Templatizing
SPOSet
toSPOSetT<T>
.SPOSet
is aliased toSPOSetT<QMCTraits::QTBase::ValueType>
.Ye's comment:
This is the beginning of an effort to allow a single build of QMCPACK with real and complex and also mixed precision.
We start from the lower level components of TWF and gradually turn the whole TWF into template.
This PR turns SPOSet template and both real and complex specialization are unconditionally instantiated. We will work on SPOSet derived classes next.
What type(s) of changes does this code introduce?
Does this introduce a breaking change?
What systems has this change been tested on?
Checklist
Update the following with a yes where the items apply. If you're unsure about any of them, don't hesitate to ask. This is
simply a reminder of what we are going to look for before merging your code.