Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
MMCV
Commits
9cad97bc
Unverified
Commit
9cad97bc
authored
Nov 23, 2021
by
Zaida Zhou
Committed by
GitHub
Nov 23, 2021
Browse files
[Fix] Fix compiled error on windows (#1510)
parent
71341e9a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
mmcv/ops/csrc/common/cuda/scatter_points_cuda_kernel.cuh
mmcv/ops/csrc/common/cuda/scatter_points_cuda_kernel.cuh
+10
-0
No files found.
mmcv/ops/csrc/common/cuda/scatter_points_cuda_kernel.cuh
View file @
9cad97bc
...
...
@@ -37,8 +37,13 @@ __device__ __forceinline__ static void reduceMax(double *address, double val) {
#ifdef __CUDA_ARCH__
__device__
__forceinline__
static
void
reduceAdd
(
float
*
address
,
float
val
)
{
#if (__CUDA_ARCH__ < 200)
#ifdef _MSC_VER
#pragma message( \
"compute capability lower than 2.x. fall back to use CAS version of atomicAdd for float32")
#else
#warning \
"compute capability lower than 2.x. fall back to use CAS version of atomicAdd for float32"
#endif
int
*
address_as_i
=
reinterpret_cast
<
int
*>
(
address
);
int
old
=
*
address_as_i
,
assumed
;
do
{
...
...
@@ -53,8 +58,13 @@ __device__ __forceinline__ static void reduceAdd(float *address, float val) {
__device__
__forceinline__
static
void
reduceAdd
(
double
*
address
,
double
val
)
{
#if (__CUDA_ARCH__ < 600)
#ifdef _MSC_VER
#pragma message( \
"compute capability lower than 6.x. fall back to use CAS version of atomicAdd for float64")
#else
#warning \
"compute capability lower than 6.x. fall back to use CAS version of atomicAdd for float64"
#endif
unsigned
long
long
*
address_as_ull
=
reinterpret_cast
<
unsigned
long
long
*>
(
address
);
unsigned
long
long
old
=
*
address_as_ull
,
assumed
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment