Skip to content

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
atafra committed Nov 9, 2024
1 parent 0992786 commit 48e4931
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
8 changes: 8 additions & 0 deletions core/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,4 +334,12 @@ OIDN_NAMESPACE_BEGIN
}
}

void Device::syncAndThrow(SyncMode sync)
{
if (sync == SyncMode::Blocking)
waitAndThrow();
else
flush();
}

OIDN_NAMESPACE_END
8 changes: 1 addition & 7 deletions core/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,7 @@ OIDN_NAMESPACE_BEGIN
void waitAndThrow();

// Calls waitAndThrow() or flush() depending on the sync mode
void syncAndThrow(SyncMode sync)
{
if (sync == SyncMode::Blocking)
waitAndThrow();
else
flush();
}
void syncAndThrow(SyncMode sync);

protected:
virtual void init() = 0;
Expand Down

0 comments on commit 48e4931

Please sign in to comment.