piiswrong commented on a change in pull request #7947: Refactor infer storage
function for sparse operators.
URL: https://github.com/apache/incubator-mxnet/pull/7947#discussion_r141441547
##########
File path: src/operator/operator_common.h
##########
@@ -253,6 +300,48 @@ inline bool type_assign(int *y, const int& x) {
}
#endif
+/*! \brief assign stype to target_stype, if successful,
+ * assign dispatch_mode to target_dispatch
+ */
+inline bool storage_type_assign(int* stype,
+ const NDArrayStorageType target_stype,
+ DispatchMode* dispatch,
+ const DispatchMode target_dispatch) {
Review comment:
why not disentangle this into two functions, storage_type_assign and
dispatch_mode_assign? Looks like the logic is well separated
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services