Skip to content

Commit

Permalink
add SampledSpectrum::detach()
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Dec 8, 2023
1 parent e9ddd15 commit d35fe7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/compute
1 change: 1 addition & 0 deletions src/util/spec.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class SampledSpectrum {
void requires_grad() const noexcept { _samples.requires_grad(); }
void backward() const noexcept { _samples.backward(); }
void backward(const SampledSpectrum &grad) const noexcept { _samples.backward(grad._samples); }
auto detach() const noexcept { return SampledSpectrum{_samples.detach()}; }
[[nodiscard]] auto grad() const noexcept { return SampledSpectrum{_samples.grad()}; }

[[nodiscard]] Float &operator[](Expr<uint> i) noexcept {
Expand Down

0 comments on commit d35fe7a

Please sign in to comment.