Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Quality] Split utils.h and utils.cpp #2348

Merged
merged 3 commits into from
Aug 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
amend
  • Loading branch information
vmoens committed Aug 2, 2024
commit 01cec2a98532a3a78d40cd5f906d483587aa8919
3 changes: 2 additions & 1 deletion torchrl/csrc/segment_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ class SegmentTree {
public:
SegmentTree(int64_t size, const T& identity_element)
: size_(size), identity_element_(identity_element) {
for (capacity_ = 1; capacity_ <= size; capacity_ <<= 1);
for (capacity_ = 1; capacity_ <= size; capacity_ <<= 1)
;
values_.assign(2 * capacity_, identity_element_);
}

Expand Down
Loading