wkcn commented on a change in pull request #10792: [MXNET-400] support string
type for kvstore key in cpp-package
URL: https://github.com/apache/incubator-mxnet/pull/10792#discussion_r270605169
##########
File path: cpp-package/include/mxnet-cpp/kvstore.h
##########
@@ -39,12 +39,21 @@ class KVStore {
static void SetType(const std::string& type);
static void RunServer();
static void Init(int key, const NDArray& val);
+ static void Init(const std::string& key, const NDArray& val);
static void Init(const std::vector<int>& keys, const std::vector<NDArray>&
vals);
+ static void Init(const std::vector<std::string>& keys, const
std::vector<NDArray>& vals);
static void Push(int key, const NDArray& val, int priority = 0);
+ static void Push(const std::string& key, const NDArray& val, int priority =
0);
static void Push(const std::vector<int>& keys,
- const std::vector<NDArray>& vals, int priority = 0);
+ const std::vector<NDArray>& vals, int priority = 0);
+ static void Push(const std::vector<std::string>& keys,
+ const std::vector<NDArray>& vals, int priority = 0);
static void Pull(int key, NDArray* out, int priority = 0);
- static void Pull(const std::vector<int>& keys, std::vector<NDArray>* outs,
int priority = 0);
+ static void Pull(const std::string& key, NDArray* out, int priority = 0);
Review comment:
Why is the second argument a reference in 'Push', but a pointer in 'Pull'?
Edit:
I see : )
----------------------------------------------------------------
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