From 47d5dc88247035b35ca3cfce159565f92d8fbb75 Mon Sep 17 00:00:00 2001 From: Andres Suarez Date: Sun, 14 Apr 2024 11:28:32 -0700 Subject: [PATCH] Apply clang-format 18 Summary: Previously this code conformed from clang-format 12. Reviewed By: igorsugak Differential Revision: D56065247 fbshipit-source-id: f5a985dd8f8b84f2f9e1818b3719b43c5a1b05b3 --- pytorch3d/csrc/pulsar/host/commands.h | 4 ++-- pytorch3d/csrc/pulsar/include/renderer.construct.device.h | 2 +- pytorch3d/csrc/rasterize_coarse/rasterize_coarse.cu | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pytorch3d/csrc/pulsar/host/commands.h b/pytorch3d/csrc/pulsar/host/commands.h index 4378303b..a48eaaa9 100644 --- a/pytorch3d/csrc/pulsar/host/commands.h +++ b/pytorch3d/csrc/pulsar/host/commands.h @@ -357,11 +357,11 @@ void MAX_WS( // // #define END_PARALLEL() \ - end_parallel:; \ + end_parallel :; \ } #define END_PARALLEL_NORET() } #define END_PARALLEL_2D() \ - end_parallel:; \ + end_parallel :; \ } \ } #define END_PARALLEL_2D_NORET() \ diff --git a/pytorch3d/csrc/pulsar/include/renderer.construct.device.h b/pytorch3d/csrc/pulsar/include/renderer.construct.device.h index 8e9ada4b..984f7710 100644 --- a/pytorch3d/csrc/pulsar/include/renderer.construct.device.h +++ b/pytorch3d/csrc/pulsar/include/renderer.construct.device.h @@ -93,7 +93,7 @@ HOST void construct( MALLOC(self->di_sorted_d, DrawInfo, max_num_balls); MALLOC(self->region_flags_d, char, max_num_balls); MALLOC(self->num_selected_d, size_t, 1); - MALLOC(self->forw_info_d, float, width* height*(3 + 2 * n_track)); + MALLOC(self->forw_info_d, float, width* height * (3 + 2 * n_track)); MALLOC(self->min_max_pixels_d, IntersectInfo, 1); MALLOC(self->grad_pos_d, float3, max_num_balls); MALLOC(self->grad_col_d, float, max_num_balls* n_channels); diff --git a/pytorch3d/csrc/rasterize_coarse/rasterize_coarse.cu b/pytorch3d/csrc/rasterize_coarse/rasterize_coarse.cu index bb6acaf1..aed57d21 100644 --- a/pytorch3d/csrc/rasterize_coarse/rasterize_coarse.cu +++ b/pytorch3d/csrc/rasterize_coarse/rasterize_coarse.cu @@ -244,8 +244,7 @@ at::Tensor RasterizeCoarseCuda( if (num_bins_y >= kMaxItemsPerBin || num_bins_x >= kMaxItemsPerBin) { std::stringstream ss; ss << "In RasterizeCoarseCuda got num_bins_y: " << num_bins_y - << ", num_bins_x: " << num_bins_x << ", " - << "; that's too many!"; + << ", num_bins_x: " << num_bins_x << ", " << "; that's too many!"; AT_ERROR(ss.str()); } auto opts = elems_per_batch.options().dtype(at::kInt);