Depends On D115004
Cleans up code legibility by requiring the emitCInterface parameter to be explicit at all call-sites, and defining boolean aliases for that parameter.
Differential D115005
[mlir][sparse] Requiring emitCInterface parameter to be explicit wrengr on Dec 2 2021, 4:19 PM. Authored by
Details
Diff Detail
Event TimelineComment Actions The default was chosen since emitCInterface is the exception when generating MLIR functions, even if the majority of our here require it. (or alternatively create a CINTERFACE_ON/CINTERFACE/OFF alias for true/false, but that may be overkill here) Comment Actions I was thinking that might be the case, but wasn't certain. This differential just came about from golfing with the code (alongside D115004, D115008, D115010, and D115012, before I split them up into manageable chunks). So I'm not super attached to it, if you and River are opposed to the change.
So we should keep the /*emitCInterface=*/ even if there's no default? So then I'm guessing the reason for the annotation is because of the bool type rather than because of the optionality (as I'd been thinking)? Is there a style guide anywhere that covers these sorts of things? (since I don't recall seeing it in the llvm nor google guides) Comment Actions The default was chosen since emitCInterface is the exception when generating MLIR functions, even if the majority of our here require it. (or alternatively create a CINTERFACE_ON/CINTERFACE/OFF alias for true/false, but that may be overkill here)
Comment Actions changing enum to enum class
|
nit: Seems safer to use a proper enum class (and more inline with coding style)