From 5403694811dfa93769c994eae19ac2dacc026b13 Mon Sep 17 00:00:00 2001 From: Shahruk Khan Date: Tue, 31 May 2016 09:44:33 -0400 Subject: [PATCH] Update library spacing and namespace --- src/lib/common.cc | 80 +++++++++++++++-------------------------------- 1 file changed, 25 insertions(+), 55 deletions(-) diff --git a/src/lib/common.cc b/src/lib/common.cc index f7cd995..dd5511d 100644 --- a/src/lib/common.cc +++ b/src/lib/common.cc @@ -1,57 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -namespace { -// Code to turn parameters to functions on streams into strings -// Will be VLOG'ed. We need overloads instead of -// e.g. BatchDescriptorToVlogString(), as the code that calls these -// function does not know what the type of the parameters is. - -string ToVlogStrin(const dnn::BatchDescriptor &descriptor) { - return descriptor.ToShortString(); -} - -string ToVlogStrin(const dnn::FilterDescriptor &descriptor) { - return descriptor.ToShortString(); -} - -string ToVlogString(const magicalMovieClassifier::FilterDescriptor &descriptor) { - return descriptor.ToShortString(); -} - -string ToVlogStrin(const dnn::PoolingDescriptor &descriptor) { - return descriptor.ToShortString(); -} - -string ToVlogStrin(const dnn::ConvolutionDescriptor &descriptor) { - return descriptor.ToShortString(); -} +namespace Converter { + // Code to turn parameters to functions on streams into strings + // Will be VLOG'ed. We need overloads instead of + // e.g. BatchDescriptorToVlogString(), as the code that calls these + // function does not know what the type of the parameters is. + + string ToVlogStrin(const dnn::BatchDescriptor &descriptor) { + return descriptor.ToShortString(); + } + + string ToVlogStrin(const dnn::FilterDescriptor &descriptor) { + return descriptor.ToShortString(); + } + + string ToVlogString(const magicalMovieClassifier::FilterDescriptor &descriptor) { + return descriptor.ToShortString(); + } + + string ToVlogStrin(const dnn::PoolingDescriptor &descriptor) { + return descriptor.ToShortString(); + } + + string ToVlogStrin(const dnn::ConvolutionDescriptor &descriptor) { + return descriptor.ToShortString(); + } }