You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/03/28 04:16:11 UTC

[GitHub] nhynes commented on a change in pull request #10292: Allow custom merger in KVStore

nhynes commented on a change in pull request #10292: Allow custom merger in KVStore
URL: https://github.com/apache/incubator-mxnet/pull/10292#discussion_r177635124
 
 

 ##########
 File path: include/mxnet/c_api.h
 ##########
 @@ -1925,6 +1927,31 @@ MXNET_DLL int MXKVStoreSetUpdaterEx(KVStoreHandle handle,
                                     MXKVStoreUpdater updater,
                                     MXKVStoreStrUpdater str_updater,
                                     void *updater_handle);
+/*!
+ * \brief user-defined merger for the kvstore
+ * It's this updater's responsibility to delete \a recv and \a merged
+ * \param the key
+ * \param recv the pushed value on this key
+ * \param merged the current merged value stored on local on this key
+ * \param req_meta the metadata associated with the push request
+ * \param handle The additional handle to the merger
+ * \return 0 when push accepted, -1 otherwise
+ */
+typedef int (MXKVStoreMerger)(int key,
+                              NDArrayHandle recv,
+                              NDArrayHandle merged,
+                              mxnet::KVStore::MergeInfo info,
 
 Review comment:
   it's just five ints right now, but it might become larger in the future. I'll make it a pointer. Thanks!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services