Skip to content

Commit

Permalink
Fix one-off error in usm_allocation_order
Browse files Browse the repository at this point in the history
  • Loading branch information
fknorr committed Jan 23, 2024
1 parent 8cc4760 commit 790b821
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/simsycl/system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ struct usm_allocation_order {
using is_transparent = std::true_type;

bool operator()(const usm_allocation &lhs, const usm_allocation &rhs) const {
SIMSYCL_CHECK((lhs.m_end <= rhs.m_begin || rhs.m_end <= lhs.m_begin)
SIMSYCL_CHECK(lhs.m_end <= rhs.m_begin || rhs.m_end <= lhs.m_begin
|| (lhs.m_begin == rhs.m_begin && lhs.m_end == rhs.m_end));
return lhs.m_begin < rhs.m_begin;
}

bool operator()(const usm_allocation &lhs, const void *rhs) const { return lhs.m_end < rhs; }
bool operator()(const usm_allocation &lhs, const void *rhs) const { return lhs.m_end <= rhs; }
bool operator()(const void *lhs, const usm_allocation &rhs) const { return lhs < rhs.m_begin; }
};

Expand Down

0 comments on commit 790b821

Please sign in to comment.