From bd52f4a408b29dc6b4357b70c93fd7a9749ca820 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Mon, 13 May 2024 16:40:34 -0700 Subject: [PATCH] c10::optional -> std::optional in tensorboard/adhoc/Adhoc.h +9 Summary: `c10::optional` was switched to be `std::optional` after PyTorch moved to C++17. Let's eliminate `c10::optional`, if we can. Reviewed By: albanD Differential Revision: D57294278 fbshipit-source-id: f6f26133c43f8d92a4588f59df7d689e7909a0cd --- pytorch3d/csrc/pulsar/pytorch/renderer.cpp | 12 ++++++------ pytorch3d/csrc/pulsar/pytorch/renderer.h | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/pytorch3d/csrc/pulsar/pytorch/renderer.cpp b/pytorch3d/csrc/pulsar/pytorch/renderer.cpp index 4349aea7..aa53192c 100644 --- a/pytorch3d/csrc/pulsar/pytorch/renderer.cpp +++ b/pytorch3d/csrc/pulsar/pytorch/renderer.cpp @@ -213,8 +213,8 @@ std::tuple Renderer::arg_check( const float& gamma, const float& max_depth, float& min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode) { @@ -668,8 +668,8 @@ std::tuple Renderer::forward( const float& gamma, const float& max_depth, float min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode) { @@ -912,8 +912,8 @@ Renderer::backward( const float& gamma, const float& max_depth, float min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode, diff --git a/pytorch3d/csrc/pulsar/pytorch/renderer.h b/pytorch3d/csrc/pulsar/pytorch/renderer.h index 2525ca3f..33f9e24f 100644 --- a/pytorch3d/csrc/pulsar/pytorch/renderer.h +++ b/pytorch3d/csrc/pulsar/pytorch/renderer.h @@ -44,8 +44,8 @@ struct Renderer { const float& gamma, const float& max_depth, float min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode); @@ -75,8 +75,8 @@ struct Renderer { const float& gamma, const float& max_depth, float min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode, @@ -115,8 +115,8 @@ struct Renderer { const float& gamma, const float& max_depth, float& min_depth, - const c10::optional& bg_col, - const c10::optional& opacity, + const std::optional& bg_col, + const std::optional& opacity, const float& percent_allowed_difference, const uint& max_n_hits, const uint& mode);