Skip to content

Add references to TQMICs in more places#433

Open
aeliasso wants to merge 5 commits intomainfrom
doc-tqmics-in-templates
Open

Add references to TQMICs in more places#433
aeliasso wants to merge 5 commits intomainfrom
doc-tqmics-in-templates

Conversation

@aeliasso
Copy link
Copy Markdown
Contributor

No description provided.

@aeliasso aeliasso requested a review from lwaern-intel April 10, 2026 10:14
}
```

[Template-qualified method implementation calls](#template-qualified-method-implementation-calls) is one way of resolving overrides that are ambiguous because they have the same rank.
Copy link
Copy Markdown
Contributor

@lwaern-intel lwaern-intel Apr 10, 2026

Choose a reason for hiding this comment

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

Nit: conflicts don't typically arise due to two definitions of the same rank, but rather, because of two definitions of unrelated ranks (neither rank is higher than the other.) This is because ranks form a partial order rather than a total order. I'll clean this up with my commits.

Tangent: I don't think it's possible to provoke EAMBINH from definitions of the same rank at all. DMLC makes some checks that assumes that if two definitions are of the same rank, then they are being made in the same block; which it catches and reports as name collisions instead (ENAMECOLL). This is evidenced by this rather funny case that we unit-test:

template structural_clash {
    // EAMBINH might be a better description of this clash
    /// ERROR ENAMECOLL
    param p default 1;
    group g {
        /// ERROR ENAMECOLL
        param p default 2;
    }
}
group gg is (structural_clash) {
    group g is (structural_clash);
}

Here the param p definitions which the template places in two structurally distinct blocks are made to conflict, and stupid-dumb DMLC still reports it as a name collision rather than definitional ambiguity because both param definitions have the same rank.

@lwaern-intel lwaern-intel marked this pull request as ready for review April 10, 2026 11:58
@lwaern-intel
Copy link
Copy Markdown
Contributor

@aeliasso I've touched up some stuff, and added some new stuff of my own. Take a look; I wanna make sure I haven't changed anything in a way you disagree with, and also check if I've written anything weird or confusing I need to explain better.

calls](#template-qualified-method-implementation-calls).

The technical rules for resolution of overrides, collectively called the
*ranking algorithm*, are as follows:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I couldn't resist. I figured I may as well officially coin the term since us DMLC developers use it all the time.

See [Resolution of Overrides](language.html#resolution-of-overrides)
"""
# 'Resolution of overrides' does not exist in the 1.2 reference manual
version = "1.4"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@mandolaerik This makes me frown, but I suppose we could be OK with it. We don't care overmuch about the 1.2 reference manual rotting, do we?

@lwaern-intel lwaern-intel force-pushed the doc-tqmics-in-templates branch from 94d8f02 to 38fefb1 Compare April 10, 2026 12:04
@syssimics syssimics requested a review from lwaern-intel April 10, 2026 12:06
@syssimics
Copy link
Copy Markdown
Contributor

PR Verification: ✅ success

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