summaryrefslogtreecommitdiff
path: root/c10/macros
diff options
context:
space:
mode:
authorYangqing Jia <jiayq@fb.com>2018-10-17 12:55:01 -0700
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-10-17 12:57:19 -0700
commit7d5f7ed270079ea326545b94e03034f0172cc53c (patch)
tree8d2e93f7001d9a6a5fe7601306836556f2fb8b81 /c10/macros
parent348867c10b14509518291fc7a03d17a087f9c7bf (diff)
downloadpytorch-7d5f7ed270079ea326545b94e03034f0172cc53c.tar.gz
pytorch-7d5f7ed270079ea326545b94e03034f0172cc53c.tar.bz2
pytorch-7d5f7ed270079ea326545b94e03034f0172cc53c.zip
Using c10 namespace across caffe2. (#12714)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/12714 This is a short change to enable c10 namespace in caffe2. We did not enable it before due to gflags global variable confusion, but it should have been mostly cleaned now. Right now, the plan on record is that namespace caffe2 and namespace aten will fully be supersets of namespace c10. Most of the diff is codemod, and only two places of non-codemod is in caffe2/core/common.h, where ``` using namespace c10; ``` is added, and in Flags.h, where instead of creating aliasing variables in c10 namespace, we directly put it in the global namespace to match gflags (and same behavior if gflags is not being built with). Reviewed By: dzhulgakov Differential Revision: D10390486 fbshipit-source-id: 5e2df730e28e29a052f513bddc558d9f78a23b9b
Diffstat (limited to 'c10/macros')
-rw-r--r--c10/macros/Macros.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/c10/macros/Macros.h b/c10/macros/Macros.h
index 53a5a7f420..7c007dc756 100644
--- a/c10/macros/Macros.h
+++ b/c10/macros/Macros.h
@@ -48,4 +48,8 @@
#endif
#endif
+// Simply define the namespace, in case a dependent library want to refer to
+// the c10 namespace but not any nontrivial files.
+namespace c10 {} // namespace c10
+
#endif // C10_MACROS_MACROS_H_