From 366eff21d9d1853a87961129625adb42032af665 Mon Sep 17 00:00:00 2001 From: Ting Xu Date: Wed, 21 May 2025 07:46:49 -0700 Subject: [PATCH] Fix PyTorch3D build failure on windows Summary: Replace #defines by typedefs by following the instructions at https://github.com/facebookresearch/pytorch3d/issues/1970?fbclid=IwY2xjawKZqMJleHRuA2FlbQIxMQBicmlkETFyWFczV2hMVmdOczJWellIAR7jxI6zGQiC5ag-FUXjSK12ljn7rmbMKc3HsLX-BC1TMpOUTJy-bsZxmfKzmw_aem_MIG_nc3eg7LL1o2fSAbl0A#issuecomment-2894339456 Reviewed By: bottler Differential Revision: D75083182 fbshipit-source-id: 7131fe555bb0da615b341e77ddd8761ebce9d7eb --- pytorch3d/csrc/pulsar/global.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pytorch3d/csrc/pulsar/global.h b/pytorch3d/csrc/pulsar/global.h index 16040119..88656a00 100644 --- a/pytorch3d/csrc/pulsar/global.h +++ b/pytorch3d/csrc/pulsar/global.h @@ -15,8 +15,8 @@ #endif #if defined(_WIN64) || defined(_WIN32) -#define uint unsigned int -#define ushort unsigned short +using uint = unsigned int; +using ushort = unsigned short; #endif #include "./logging.h" // <- include before torch/extension.h