You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently under Operator.cpp code gen for different operations are done by a bunch of branching statements, and the branching statements are based on the OP_ID of the operations (e.g. _vv, _vx, or even specialized for a certain operator if (op->opType == "msbf_m")).
This is rather troublesome and bugs may hide inside type-o of these statements.
A better implementation would be have enums that represents categories of these code gen and appending the enun as a parameter inside the definition file of the operator.
Moreover, if the operator already contains codegen category enum, then the function generateOperatorCode can be template-ized.
Currently under
Operator.cpp
code gen for different operations are done by a bunch of branching statements, and the branching statements are based on theOP_ID
of the operations (e.g._vv
,_vx
, or even specialized for a certain operatorif (op->opType == "msbf_m")
).This is rather troublesome and bugs may hide inside type-o of these statements.
A better implementation would be have enums that represents categories of these code gen and appending the enun as a parameter inside the definition file of the operator.
Moreover, if the operator already contains codegen category enum, then the function
generateOperatorCode
can be template-ized.This issue can be solved by:
Operator.cpp
to utilize the appended informationThe text was updated successfully, but these errors were encountered: