From 0281e51fe56cc890b224acaa2aab7ff19629d2c4 Mon Sep 17 00:00:00 2001 From: Cai Shanli Date: Sun, 1 Mar 2020 14:40:59 +0800 Subject: [PATCH] named all enum types (#1570) --- src/layer/binaryop.h | 2 +- src/layer/eltwise.h | 2 +- src/layer/lrn.h | 2 +- src/layer/pooling.h | 2 +- src/layer/reduction.h | 2 +- src/layer/spp.h | 2 +- src/layer/unaryop.h | 2 +- src/layer_type.h | 2 +- src/mat.h | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/layer/binaryop.h b/src/layer/binaryop.h index 7660aef24..e79929cc0 100644 --- a/src/layer/binaryop.h +++ b/src/layer/binaryop.h @@ -32,7 +32,7 @@ public: virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; - enum { + enum OperationType { Operation_ADD = 0, Operation_SUB = 1, Operation_MUL = 2, diff --git a/src/layer/eltwise.h b/src/layer/eltwise.h index 6b8a8effc..2f0d05c9e 100644 --- a/src/layer/eltwise.h +++ b/src/layer/eltwise.h @@ -28,7 +28,7 @@ public: virtual int forward(const std::vector& bottom_blobs, std::vector& top_blobs, const Option& opt) const; - enum { Operation_PROD = 0, Operation_SUM = 1, Operation_MAX = 2 }; + enum OperationType { Operation_PROD = 0, Operation_SUM = 1, Operation_MAX = 2 }; public: // param diff --git a/src/layer/lrn.h b/src/layer/lrn.h index 520a24117..92810d9cd 100644 --- a/src/layer/lrn.h +++ b/src/layer/lrn.h @@ -28,7 +28,7 @@ public: virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; - enum { NormRegion_ACROSS_CHANNELS = 0, NormRegion_WITHIN_CHANNEL = 1 }; + enum NormRegionType { NormRegion_ACROSS_CHANNELS = 0, NormRegion_WITHIN_CHANNEL = 1 }; public: // param diff --git a/src/layer/pooling.h b/src/layer/pooling.h index 664034984..e475c5253 100644 --- a/src/layer/pooling.h +++ b/src/layer/pooling.h @@ -28,7 +28,7 @@ public: virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; - enum { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; + enum PoolMethod { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; public: // param diff --git a/src/layer/reduction.h b/src/layer/reduction.h index ab4f152a3..fc4ef45d7 100644 --- a/src/layer/reduction.h +++ b/src/layer/reduction.h @@ -28,7 +28,7 @@ public: virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; - enum { + enum ReductionOp { ReductionOp_SUM = 0, ReductionOp_ASUM = 1, ReductionOp_SUMSQ = 2, diff --git a/src/layer/spp.h b/src/layer/spp.h index 015880a8b..0134060d9 100644 --- a/src/layer/spp.h +++ b/src/layer/spp.h @@ -28,7 +28,7 @@ public: virtual int forward(const Mat& bottom_blob, Mat& top_blob, const Option& opt) const; - enum { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; + enum PoolMethod { PoolMethod_MAX = 0, PoolMethod_AVE = 1 }; public: // param diff --git a/src/layer/unaryop.h b/src/layer/unaryop.h index 4ba9c6a51..ede06b502 100644 --- a/src/layer/unaryop.h +++ b/src/layer/unaryop.h @@ -28,7 +28,7 @@ public: virtual int forward_inplace(Mat& bottom_top_blob, const Option& opt) const; - enum { + enum OperationType { Operation_ABS = 0, Operation_NEG = 1, Operation_FLOOR = 2, diff --git a/src/layer_type.h b/src/layer_type.h index 91da74355..a87d9f457 100644 --- a/src/layer_type.h +++ b/src/layer_type.h @@ -18,7 +18,7 @@ namespace ncnn { namespace LayerType { -enum +enum LayerType { #include "layer_type_enum.h" CustomBit = (1<<8), diff --git a/src/mat.h b/src/mat.h index cc04e09b8..f5317b0f1 100644 --- a/src/mat.h +++ b/src/mat.h @@ -477,7 +477,7 @@ void kanna_rotate_yuv420sp(const unsigned char* src, int srcw, int srch, unsigne #endif // NCNN_PIXEL_ROTATE // mat process -enum +enum BorderType { BORDER_CONSTANT = 0, BORDER_REPLICATE = 1,