Placing parameter structs outside their respective classes #199
Labels
state: inactive
Issue is abandoned, but might become relavent at some point
type: fix
Iterations on existing features or infrastructure. Optimizations, refactoring, etc.
If I want to use
MetisReordering
with theReorderBase
function, I'd need to declare the parameters object alone and use templates for it:MetisReorder<ull, ull, val>::MetisReorderParams params; ull *perm = ReorderBase::Reorder<MetisReorder>(params, A, {&cpu_context}, true);
As you can see we need the template types for the params object. It isn't very aesthetically pleasing. The way to avoid this is to have users pass all the members of the params object to the Reorder call which is too many:
We can also declare this struct outside the
MetisReorder
class. But this solution isn't "general" since there are preprocessings in which the parameters are templated (in Permute, the ordering is dependent onIDType
).I'm leaning towards declaring the params structs outside their classes. I have three reasons:
The only problem is that when it was inside the class the namespacing allows the IDE to figure it out. But if the params struct and the class itself have the same prefix then it wouldn't be that bad; we can maintain the standard of
ParamsTypeName = PreprocessingName+"Params"
The text was updated successfully, but these errors were encountered: