diff --git a/paddle/platform/place.cc b/paddle/platform/place.cc index d500c4cc7a0b46d4bb02812101dec60a150363ab..1afd03c01169d395b086c1da458ce25c66a12a51 100644 --- a/paddle/platform/place.cc +++ b/paddle/platform/place.cc @@ -6,16 +6,16 @@ namespace platform { namespace detail { class PlacePrinter : public boost::static_visitor<> { -public: + public: PlacePrinter(std::ostream &os) : os_(os) {} void operator()(const CpuPlace &) { os_ << "CpuPlace"; } void operator()(const GpuPlace &p) { os_ << "GpuPlace(" << p.device << ")"; } -private: + private: std::ostream &os_; }; -} // namespace detail +} // namespace detail static Place the_default_place; @@ -42,5 +42,5 @@ std::ostream &operator<<(std::ostream &os, const Place &p) { return os; } -} // namespace platform -} // namespace paddle +} // namespace platform +} // namespace paddle diff --git a/paddle/platform/place.h b/paddle/platform/place.h index ca1b76ef4b8b7d8a38b3e80b9b798ee392e60a1e..489572c526e162500c8f747f0ec8df10da9d86a2 100644 --- a/paddle/platform/place.h +++ b/paddle/platform/place.h @@ -45,5 +45,5 @@ bool places_are_same_class(const Place &, const Place &); std::ostream &operator<<(std::ostream &, const Place &); -} // namespace platform -} // namespace paddle +} // namespace platform +} // namespace paddle