From ccdc61c0878d27ac7cccfecd7b474320817f0bbf Mon Sep 17 00:00:00 2001 From: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> Date: Tue, 11 Jan 2022 12:55:07 +0800 Subject: [PATCH] [Fix] Fix the compilation error on windows (#1657) --- mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh | 2 +- mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh b/mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh index e73321e29d..2af96f7963 100644 --- a/mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh +++ b/mmcv/ops/csrc/common/cuda/convex_iou_cuda_kernel.cuh @@ -10,7 +10,7 @@ #define MAXN 100 #define NMAX 512 -const double EPS = 1E-8; +__device__ const double EPS = 1E-8; __device__ inline int sig(double d) { return (d > EPS) - (d < -EPS); } diff --git a/mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh b/mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh index f06288f0fc..40d69f248b 100644 --- a/mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh +++ b/mmcv/ops/csrc/common/cuda/min_area_polygons_cuda.cuh @@ -9,8 +9,7 @@ #endif #define MAXN 20 -const float EPS = 1E-8; -const float PI = 3.1415926; +__device__ const float PI = 3.1415926; struct Point { float x, y;