-
Notifications
You must be signed in to change notification settings - Fork 44
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
Fixes incorrect team in Pattern/Array by calling the wrong ctor unintended #354
Conversation
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.
@@ -249,11 +249,10 @@ class BlockPattern | |||
/// Pattern size (extent, number of elements) in every dimension | |||
const SizeSpec_t & sizespec, | |||
/// Distribution type (BLOCKED, CYCLIC, BLOCKCYCLIC, TILE or NONE) of | |||
/// all dimensions. Defaults to BLOCKED in first, and NONE in higher | |||
/// 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.
fix documentation (currently ends with "of")
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.
Thats actually just a tricky way of git displaying it.
I fell for it too yesterday and repeated that commit.
/// all dimensions. Defaults to BLOCKED in first, and NONE in higher | ||
/// dimensions | ||
const DistributionSpec_t & dist = DistributionSpec_t(), | ||
/// all 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.
@fmoessbauer Look here, there is the rest of the line.
@ddiefenthaler Great job, thanks a lot for the quick fix! I added the check to the While we are at it: Skimming through the code yesterday, I noticed that the |
While we are at it: I fixed some other bugs in the CSR pattern as well. If you like, pull in (cherry-pick) 0609a02fd58e7. Btw: we definitely need concept checking on the patterns. |
I temporarily merged with If desired the constructor readded in this PR could get shortend by delegating to the other constructor While being at cherry picking at CSRPattern I'll also add an constructor with the signatur |
Delegating the constructor would look like this:
against the current implementation. @devreal, @fuchsto is this preferred? This would be applicable to most patterns.
|
@fuchsto Here is a patch which would include the delegating constructors: Apply it if you like, |
This pull request reverts the changes from PR #304 and solves it in a different way.
With the removal of the constructors from
BlockPattern
it got incompatible to theCSRPattern
,as the constructor of the
CSRPattern
differs in the signature.To fix the ambiguity in the constructors this pull request removes some of the default paramters.
See also
TilePattern
for example, it is done there in the same way. Parameter ofTilePattern
ctorDue to the missing constructor the wrong constructor got called from
dash::Array
which lead to always usingdash::Team::All()
as the team of the array. This behaviour is observed in issue #353.Fixes #353 and a part #292 (
ThreadsafetyTest.ConcurrentAlgorithm
).