提交 beb26978 编写于 作者: D dzhwinter

"change header guard to pragma"

上级 81cad374
......@@ -9,17 +9,6 @@ set(OPITMIZER_SRCS
sgd_optmizer.cc
)
set(OPITMIZER_HEADERS
adadelta_optimizer.h
adagrad_optimizer.h
adam_optimizer.h
lr_policy.h
optimizer.h
parameter_optimizer.h
sgd_optimizer.h
tensor.h
)
add_library(optimizer STATIC ${OPITMIZER_SRCS})
add_dependencies(optimizer gen_proto_cpp)
......
#ifndef PADDLE_OPTIMIZER_TENSOR_H_
#define PADDLE_OPTIMIZER_TENSOR_H_
#pragma once
/**
* @brief tensor used by optimizer
*/
#include <string.h>
#include <memory>
#include "paddle/utils/Common.h"
#include "paddle/utils/Logging.h"
......@@ -45,5 +45,3 @@ typedef TensorT<real> Tensor;
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_ADADELTA_OPTIMIZER_H_
#define PADDLE_ADADELTA_OPTIMIZER_H_
#pragma once
#include "parameter_optimizer.h"
......@@ -31,5 +30,3 @@ private:
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_ADAGRAD_OPTIMIZER_H_
#define PADDLE_ADAGRAD_OPTIMIZER_H_
#pragma once
#include "parameter_optimizer.h"
......@@ -25,5 +24,3 @@ private:
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_ADAM_OPTIMIZER_H_
#define PADDLE_ADAM_OPTIMIZER_H_
#pragma once
#include "parameter_optimizer.h"
......@@ -34,4 +33,3 @@ private:
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_OPTIMIZER_LR_POLICY_H_
#define PADDLE_OPTIMIZER_LR_POLICY_H_
#pragma once
#include <algorithm>
#include "OptimizerConfig.pb.h"
......@@ -41,5 +40,3 @@ private:
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_LIB_OPTIMIZER_H_
#define PADDLE_LIB_OPTIMIZER_H_
#pragma once
#include <stdbool.h>
#include <stdint.h>
......@@ -93,4 +93,3 @@ int paddle_optimizer_get_state(paddle_optimizer* o, const char* state);
#ifdef __cplusplus
}
#endif
#endif
#ifndef PADDLE_PARAMETER_OPTIMIZER_H_
#define PADDLE_PARAMETER_OPTIMIZER_H_
#pragma once
#include <glog/logging.h>
#include <functional>
......@@ -40,5 +39,3 @@ protected:
} // namespace optimizer
} // namespace paddle
#endif
#ifndef PADDLE_OPTIMIZER_SERIALIZARION_H
#define PADDLE_OPTIMIZER_SERIALIZARION_H
#pragma once
#include <sstream>
#include <string>
......@@ -33,4 +32,3 @@ static void ProtoToTensor(const TensorProto& proto, Tensor* tensor) {
} // namespace optimizer
} // namespace paddle
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册