haojin2 commented on a change in pull request #17567: [Numpy] Add op fmax
URL: https://github.com/apache/incubator-mxnet/pull/17567#discussion_r377946942
##########
File path: src/operator/mshadow_op.h
##########
@@ -1107,6 +1107,21 @@ struct maximum : public mxnet_op::tunable {
}
};
+/*! \brief used for computing binary operator fmax */
+struct fmax : public mxnet_op::tunable {
+ template<typename DType>
+ MSHADOW_XINLINE static DType Map(DType a, DType b) {
+ if (IsNan(b)) {
+ return a;
+ } else if (IsNan(a)) {
+ return b;
+ }
+ else {
Review comment:
`} else {`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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