From 96481c395d5e55830e252558656768f2d8756444 Mon Sep 17 00:00:00 2001 From: szykk1993 Date: Mon, 26 Nov 2018 16:14:25 -0500 Subject: [PATCH] Undefine OpenCV in c source files to avoid compilation failure using new OpenCV. --- src/activation_layer.c | 2 ++ src/activations.c | 2 ++ src/avgpool_layer.c | 2 ++ src/batchnorm_layer.c | 2 ++ src/blas.c | 2 ++ src/box.c | 2 ++ src/connected_layer.c | 2 ++ src/convolutional_layer.c | 2 ++ src/cost_layer.c | 2 ++ src/crnn_layer.c | 2 ++ src/crop_layer.c | 2 ++ src/data.c | 2 ++ src/deconvolutional_layer.c | 2 ++ src/demo.c | 2 ++ src/detection_layer.c | 2 ++ src/dropout_layer.c | 2 ++ src/gemm.c | 2 ++ src/gru_layer.c | 2 ++ src/image.c | 2 ++ src/iseg_layer.c | 2 ++ src/l2norm_layer.c | 2 ++ src/layer.c | 2 ++ src/list.c | 2 ++ src/local_layer.c | 2 ++ src/logistic_layer.c | 2 ++ src/lstm_layer.c | 2 ++ src/matrix.c | 2 ++ src/maxpool_layer.c | 2 ++ src/network.c | 2 ++ src/normalization_layer.c | 2 ++ src/option_list.c | 2 ++ src/parser.c | 2 ++ src/region_layer.c | 2 ++ src/reorg_layer.c | 2 ++ src/rnn_layer.c | 2 ++ src/route_layer.c | 2 ++ src/shortcut_layer.c | 2 ++ src/softmax_layer.c | 2 ++ src/tree.c | 2 ++ src/upsample_layer.c | 2 ++ src/utils.c | 2 ++ src/yolo_layer.c | 2 ++ 42 files changed, 84 insertions(+) diff --git a/src/activation_layer.c b/src/activation_layer.c index b4ba9539..8a1d9f9a 100644 --- a/src/activation_layer.c +++ b/src/activation_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "activation_layer.h" #include "utils.h" #include "cuda.h" diff --git a/src/activations.c b/src/activations.c index da1a17a8..5f22a2ad 100644 --- a/src/activations.c +++ b/src/activations.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "activations.h" #include diff --git a/src/avgpool_layer.c b/src/avgpool_layer.c index 83034dbe..b4f61933 100644 --- a/src/avgpool_layer.c +++ b/src/avgpool_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "avgpool_layer.h" #include "cuda.h" #include diff --git a/src/batchnorm_layer.c b/src/batchnorm_layer.c index ebff387c..96c35941 100644 --- a/src/batchnorm_layer.c +++ b/src/batchnorm_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "convolutional_layer.h" #include "batchnorm_layer.h" #include "blas.h" diff --git a/src/blas.c b/src/blas.c index 9e160444..f316ac23 100644 --- a/src/blas.c +++ b/src/blas.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "blas.h" #include diff --git a/src/box.c b/src/box.c index 8a1772c9..44a1d039 100644 --- a/src/box.c +++ b/src/box.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "box.h" #include #include diff --git a/src/connected_layer.c b/src/connected_layer.c index 353f4e56..ca9f06ca 100644 --- a/src/connected_layer.c +++ b/src/connected_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "connected_layer.h" #include "convolutional_layer.h" #include "batchnorm_layer.h" diff --git a/src/convolutional_layer.c b/src/convolutional_layer.c index 1fb58b09..edb9c1f7 100644 --- a/src/convolutional_layer.c +++ b/src/convolutional_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "convolutional_layer.h" #include "utils.h" #include "batchnorm_layer.h" diff --git a/src/cost_layer.c b/src/cost_layer.c index 2138ff26..f0f6542b 100644 --- a/src/cost_layer.c +++ b/src/cost_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "cost_layer.h" #include "utils.h" #include "cuda.h" diff --git a/src/crnn_layer.c b/src/crnn_layer.c index 7dd29f62..e90045b0 100644 --- a/src/crnn_layer.c +++ b/src/crnn_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "crnn_layer.h" #include "convolutional_layer.h" #include "utils.h" diff --git a/src/crop_layer.c b/src/crop_layer.c index 3b918529..bfa5d1cf 100644 --- a/src/crop_layer.c +++ b/src/crop_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "crop_layer.h" #include "cuda.h" #include diff --git a/src/data.c b/src/data.c index 43bd6ad3..d81424cf 100644 --- a/src/data.c +++ b/src/data.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "data.h" #include "utils.h" #include "image.h" diff --git a/src/deconvolutional_layer.c b/src/deconvolutional_layer.c index 00c0e857..d8a8cae4 100644 --- a/src/deconvolutional_layer.c +++ b/src/deconvolutional_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "deconvolutional_layer.h" #include "convolutional_layer.h" #include "batchnorm_layer.h" diff --git a/src/demo.c b/src/demo.c index 34d1553e..843e0df4 100644 --- a/src/demo.c +++ b/src/demo.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "network.h" #include "detection_layer.h" #include "region_layer.h" diff --git a/src/detection_layer.c b/src/detection_layer.c index d0e0194b..9d2bbb69 100644 --- a/src/detection_layer.c +++ b/src/detection_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "detection_layer.h" #include "activations.h" #include "softmax_layer.h" diff --git a/src/dropout_layer.c b/src/dropout_layer.c index 780554fb..ef99684b 100644 --- a/src/dropout_layer.c +++ b/src/dropout_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "dropout_layer.h" #include "utils.h" #include "cuda.h" diff --git a/src/gemm.c b/src/gemm.c index 648027f2..2fdcd5c7 100644 --- a/src/gemm.c +++ b/src/gemm.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "gemm.h" #include "utils.h" #include "cuda.h" diff --git a/src/gru_layer.c b/src/gru_layer.c index b6601d80..ee9cabf7 100644 --- a/src/gru_layer.c +++ b/src/gru_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "gru_layer.h" #include "connected_layer.h" #include "utils.h" diff --git a/src/image.c b/src/image.c index 3b7db623..bbbe6adc 100644 --- a/src/image.c +++ b/src/image.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "image.h" #include "utils.h" #include "blas.h" diff --git a/src/iseg_layer.c b/src/iseg_layer.c index 2bf03a8a..b0f9f4b0 100644 --- a/src/iseg_layer.c +++ b/src/iseg_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "iseg_layer.h" #include "activations.h" #include "blas.h" diff --git a/src/l2norm_layer.c b/src/l2norm_layer.c index d099479b..711fad08 100644 --- a/src/l2norm_layer.c +++ b/src/l2norm_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "l2norm_layer.h" #include "activations.h" #include "blas.h" diff --git a/src/layer.c b/src/layer.c index c27b4776..aa0d0b54 100644 --- a/src/layer.c +++ b/src/layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "layer.h" #include "cuda.h" diff --git a/src/list.c b/src/list.c index 0e4165d3..da3f0959 100644 --- a/src/list.c +++ b/src/list.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include "list.h" diff --git a/src/local_layer.c b/src/local_layer.c index 74f6910a..a6858f83 100644 --- a/src/local_layer.c +++ b/src/local_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "local_layer.h" #include "utils.h" #include "im2col.h" diff --git a/src/logistic_layer.c b/src/logistic_layer.c index b2b3d6b1..4389c8df 100644 --- a/src/logistic_layer.c +++ b/src/logistic_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "logistic_layer.h" #include "activations.h" #include "blas.h" diff --git a/src/lstm_layer.c b/src/lstm_layer.c index fb07de20..651e2b7d 100644 --- a/src/lstm_layer.c +++ b/src/lstm_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "lstm_layer.h" #include "connected_layer.h" #include "utils.h" diff --git a/src/matrix.c b/src/matrix.c index 6dd3174f..eaffb45a 100644 --- a/src/matrix.c +++ b/src/matrix.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "matrix.h" #include "utils.h" #include "blas.h" diff --git a/src/maxpool_layer.c b/src/maxpool_layer.c index fb05635e..846d341d 100644 --- a/src/maxpool_layer.c +++ b/src/maxpool_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "maxpool_layer.h" #include "cuda.h" #include diff --git a/src/network.c b/src/network.c index 9ea7c837..8f667fdf 100644 --- a/src/network.c +++ b/src/network.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include diff --git a/src/normalization_layer.c b/src/normalization_layer.c index 424714fe..0d132931 100644 --- a/src/normalization_layer.c +++ b/src/normalization_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "normalization_layer.h" #include "blas.h" diff --git a/src/option_list.c b/src/option_list.c index 047126fc..e6e45a3f 100644 --- a/src/option_list.c +++ b/src/option_list.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include diff --git a/src/parser.c b/src/parser.c index 41ca07d2..4c8f6d43 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include diff --git a/src/region_layer.c b/src/region_layer.c index 179f5e32..736ce590 100644 --- a/src/region_layer.c +++ b/src/region_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "region_layer.h" #include "activations.h" #include "blas.h" diff --git a/src/reorg_layer.c b/src/reorg_layer.c index 31d6b843..7adfdc61 100644 --- a/src/reorg_layer.c +++ b/src/reorg_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "reorg_layer.h" #include "cuda.h" #include "blas.h" diff --git a/src/rnn_layer.c b/src/rnn_layer.c index 8c9b457e..4e372ab3 100644 --- a/src/rnn_layer.c +++ b/src/rnn_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "rnn_layer.h" #include "connected_layer.h" #include "utils.h" diff --git a/src/route_layer.c b/src/route_layer.c index a8970a46..6958de27 100644 --- a/src/route_layer.c +++ b/src/route_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "route_layer.h" #include "cuda.h" #include "blas.h" diff --git a/src/shortcut_layer.c b/src/shortcut_layer.c index 49d17f56..2c9e7bb9 100644 --- a/src/shortcut_layer.c +++ b/src/shortcut_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "shortcut_layer.h" #include "cuda.h" #include "blas.h" diff --git a/src/softmax_layer.c b/src/softmax_layer.c index 9cbc6be1..c5c8d398 100644 --- a/src/softmax_layer.c +++ b/src/softmax_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "softmax_layer.h" #include "blas.h" #include "cuda.h" diff --git a/src/tree.c b/src/tree.c index 67b6d431..7d554fe2 100644 --- a/src/tree.c +++ b/src/tree.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include "tree.h" diff --git a/src/upsample_layer.c b/src/upsample_layer.c index 605f21f8..447344c4 100644 --- a/src/upsample_layer.c +++ b/src/upsample_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "upsample_layer.h" #include "cuda.h" #include "blas.h" diff --git a/src/utils.c b/src/utils.c index 82b7e600..9c5d1432 100644 --- a/src/utils.c +++ b/src/utils.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include #include #include diff --git a/src/yolo_layer.c b/src/yolo_layer.c index c3380363..bd965e77 100644 --- a/src/yolo_layer.c +++ b/src/yolo_layer.c @@ -1,3 +1,5 @@ +#undef OPENCV + #include "yolo_layer.h" #include "activations.h" #include "blas.h"