Skip to content

Commit

Permalink
Fix misplaced assert
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Schuchart <[email protected]>
  • Loading branch information
devreal committed Nov 27, 2023
1 parent 0ab8f47 commit fb5f111
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ttg/ttg/parsec/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,10 @@ struct buffer : public detail::ttg_parsec_data_wrapper_t
* buffer was modified outside of a TTG */
void set_current_device(const ttg::device::Device& device) {
assert(is_valid());
int parsec_id = detail::ttg_device_to_parsec_device(device);
/* make sure it's a valid device */
assert(parsec_nb_devices > device_id);
assert(parsec_nb_devices > device);
/* make sure it's a valid copy */
int parsec_id = detail::ttg_device_to_parsec_device(device);
assert(m_data->device_copies[parsec_id] != nullptr);
m_data->owner_device = parsec_id;
}
Expand Down

0 comments on commit fb5f111

Please sign in to comment.