You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ke...@apache.org on 2018/11/27 03:24:14 UTC
[incubator-mxnet] branch master updated: Added proper default value
in cpp-package for optional (#13415)
This is an automated email from the ASF dual-hosted git repository.
kellen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 48bfc8d Added proper default value in cpp-package for optional<bool> (#13415)
48bfc8d is described below
commit 48bfc8dd834557767ec77bb184e9ee0d147d4cc5
Author: Przemyslaw Tredak <pt...@gmail.com>
AuthorDate: Mon Nov 26 19:23:58 2018 -0800
Added proper default value in cpp-package for optional<bool> (#13415)
---
cpp-package/scripts/OpWrapperGenerator.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/cpp-package/scripts/OpWrapperGenerator.py b/cpp-package/scripts/OpWrapperGenerator.py
index 1b5f8b5..c26c370 100644
--- a/cpp-package/scripts/OpWrapperGenerator.py
+++ b/cpp-package/scripts/OpWrapperGenerator.py
@@ -138,6 +138,8 @@ class Arg:
self.defaultString = 'Shape(' + self.defaultString[1:-1] + ")"
elif self.type == 'dmlc::optional<int>':
self.defaultString = self.type + '(' + self.defaultString + ')'
+ elif self.type == 'dmlc::optional<bool>':
+ self.defaultString = self.type + '(' + self.defaultString + ')'
elif typeString.startswith('caffe-layer-parameter'):
self.defaultString = 'textToCaffeLayerParameter(' + self.MakeCString(self.defaultString) + ')'
hasCaffe = True