Skip to content

Commit

Permalink
Make registration macro namespace-agnostic
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 210192298
  • Loading branch information
tensorflower-gardener committed Aug 25, 2018
1 parent 5afcc0f commit 9599b47
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tensorflow/core/common_runtime/optimization_registry.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,12 @@ class OptimizationPassRegistration {
#define REGISTER_OPTIMIZATION_UNIQ_HELPER(ctr, grouping, phase, optimization) \
REGISTER_OPTIMIZATION_UNIQ(ctr, grouping, phase, optimization)

#define REGISTER_OPTIMIZATION_UNIQ(ctr, grouping, phase, optimization) \
static optimization_registration::OptimizationPassRegistration \
register_optimization_##ctr( \
grouping, phase, \
std::unique_ptr<GraphOptimizationPass>(new optimization()), \
#define REGISTER_OPTIMIZATION_UNIQ(ctr, grouping, phase, optimization) \
static ::tensorflow::optimization_registration::OptimizationPassRegistration \
register_optimization_##ctr( \
grouping, phase, \
::std::unique_ptr<::tensorflow::GraphOptimizationPass>( \
new optimization()), \
#optimization)

} // namespace tensorflow
Expand Down

0 comments on commit 9599b47

Please sign in to comment.