Skip to content

Commit 1a7442a

Browse files
bottlerfacebook-github-bot
authored andcommitted
windows compatibility
Summary: Few tweaks to make CUDA build on windows happier, as remarked in #876. Reviewed By: patricklabatut Differential Revision: D31688188 fbshipit-source-id: 20816d6215f2e3ec898f81ae4221b1c2ff24b64f
1 parent 16ebf54 commit 1a7442a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pytorch3d/csrc/iou_box3d/iou_utils.cuh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <cstdio>
1313
#include "utils/float_math.cuh"
1414

15-
const auto kEpsilon = 1e-4;
15+
__constant__ const float kEpsilon = 1e-4;
1616

1717
/*
1818
_PLANES and _TRIS define the 4- and 3-connectivity
@@ -473,10 +473,10 @@ __device__ inline int ClipTriByPlane(
473473
if (isin0 && isin1 && !isin2) {
474474
return ClipTriByPlaneOneOut(plane, normal, v2, v0, v1, face_verts_out);
475475
}
476-
if (isin0 && not isin1 && isin2) {
476+
if (isin0 && !isin1 && isin2) {
477477
return ClipTriByPlaneOneOut(plane, normal, v1, v0, v2, face_verts_out);
478478
}
479-
if (not isin0 && isin1 && isin2) {
479+
if (!isin0 && isin1 && isin2) {
480480
return ClipTriByPlaneOneOut(plane, normal, v0, v1, v2, face_verts_out);
481481
}
482482

pytorch3d/csrc/iou_box3d/iou_utils.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,10 @@ inline face_verts ClipTriByPlane(
437437
if (isin0 && isin1 && !isin2) {
438438
return ClipTriByPlaneOneOut(plane, normal, v2, v0, v1);
439439
}
440-
if (isin0 && not isin1 && isin2) {
440+
if (isin0 && !isin1 && isin2) {
441441
return ClipTriByPlaneOneOut(plane, normal, v1, v0, v2);
442442
}
443-
if (not isin0 && isin1 && isin2) {
443+
if (!isin0 && isin1 && isin2) {
444444
return ClipTriByPlaneOneOut(plane, normal, v0, v1, v2);
445445
}
446446

0 commit comments

Comments
 (0)