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 2020/04/16 03:19:10 UTC

[GitHub] [incubator-mxnet] zhreshold commented on a change in pull request #17841: Gluon data 2.0: c++ dataloader and built-in image/bbox transforms

zhreshold commented on a change in pull request #17841: Gluon data 2.0: c++ dataloader and built-in image/bbox transforms
URL: https://github.com/apache/incubator-mxnet/pull/17841#discussion_r409257171
 
 

 ##########
 File path: src/c_api/c_api.cc
 ##########
 @@ -1924,6 +1967,194 @@ int MXDataIterGetPadNum(DataIterHandle handle, int *pad) {
   API_END();
 }
 
+int MXListDatasets(uint32_t *out_size,
+                             DatasetCreator **out_array) {
+  API_BEGIN();
+  auto &vec = dmlc::Registry<DatasetReg>::List();
+  *out_size = static_cast<uint32_t>(vec.size());
+  *out_array = (DatasetCreator*)(dmlc::BeginPtr(vec));  //  NOLINT(*)
+  API_END();
+}
+
+int MXDatasetCreateDataset(DatasetCreator handle,
+                           uint32_t num_param,
+                           const char **keys,
+                           const char **vals,
+                           DatasetHandle *out) {
+  Dataset *dataset = nullptr;
+  API_BEGIN();
+  DatasetReg *e = static_cast<DatasetReg *>(handle);
+  dataset = e->body();
 
 Review comment:
   okay, I got your point, will change to constructor.

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


With regards,
Apache Git Services