Skip to content

Commit bd52f4a

Browse files
r-barnesfacebook-github-bot
authored andcommitted
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
1 parent 1711710 commit bd52f4a

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

pytorch3d/csrc/pulsar/pytorch/renderer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ std::tuple<size_t, size_t, bool, torch::Tensor> Renderer::arg_check(
213213
const float& gamma,
214214
const float& max_depth,
215215
float& min_depth,
216-
const c10::optional<torch::Tensor>& bg_col,
217-
const c10::optional<torch::Tensor>& opacity,
216+
const std::optional<torch::Tensor>& bg_col,
217+
const std::optional<torch::Tensor>& opacity,
218218
const float& percent_allowed_difference,
219219
const uint& max_n_hits,
220220
const uint& mode) {
@@ -668,8 +668,8 @@ std::tuple<torch::Tensor, torch::Tensor> Renderer::forward(
668668
const float& gamma,
669669
const float& max_depth,
670670
float min_depth,
671-
const c10::optional<torch::Tensor>& bg_col,
672-
const c10::optional<torch::Tensor>& opacity,
671+
const std::optional<torch::Tensor>& bg_col,
672+
const std::optional<torch::Tensor>& opacity,
673673
const float& percent_allowed_difference,
674674
const uint& max_n_hits,
675675
const uint& mode) {
@@ -912,8 +912,8 @@ Renderer::backward(
912912
const float& gamma,
913913
const float& max_depth,
914914
float min_depth,
915-
const c10::optional<torch::Tensor>& bg_col,
916-
const c10::optional<torch::Tensor>& opacity,
915+
const std::optional<torch::Tensor>& bg_col,
916+
const std::optional<torch::Tensor>& opacity,
917917
const float& percent_allowed_difference,
918918
const uint& max_n_hits,
919919
const uint& mode,

pytorch3d/csrc/pulsar/pytorch/renderer.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ struct Renderer {
4444
const float& gamma,
4545
const float& max_depth,
4646
float min_depth,
47-
const c10::optional<torch::Tensor>& bg_col,
48-
const c10::optional<torch::Tensor>& opacity,
47+
const std::optional<torch::Tensor>& bg_col,
48+
const std::optional<torch::Tensor>& opacity,
4949
const float& percent_allowed_difference,
5050
const uint& max_n_hits,
5151
const uint& mode);
@@ -75,8 +75,8 @@ struct Renderer {
7575
const float& gamma,
7676
const float& max_depth,
7777
float min_depth,
78-
const c10::optional<torch::Tensor>& bg_col,
79-
const c10::optional<torch::Tensor>& opacity,
78+
const std::optional<torch::Tensor>& bg_col,
79+
const std::optional<torch::Tensor>& opacity,
8080
const float& percent_allowed_difference,
8181
const uint& max_n_hits,
8282
const uint& mode,
@@ -115,8 +115,8 @@ struct Renderer {
115115
const float& gamma,
116116
const float& max_depth,
117117
float& min_depth,
118-
const c10::optional<torch::Tensor>& bg_col,
119-
const c10::optional<torch::Tensor>& opacity,
118+
const std::optional<torch::Tensor>& bg_col,
119+
const std::optional<torch::Tensor>& opacity,
120120
const float& percent_allowed_difference,
121121
const uint& max_n_hits,
122122
const uint& mode);

0 commit comments

Comments
 (0)