Skip to content

Commit

Permalink
Update usm.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
lbushi25 authored May 2, 2024
1 parent e256f54 commit 47e59a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/adapters/level_zero/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMHostAlloc(
// L0 supports alignment up to 64KB and silently ignores higher values.
// We flag alignment > 64KB as an invalid value.
// L0 spec says that alignment values that are not powers of 2 are invalid.
if (Align > 65536 || Align & (Align - 1) != 0)
if (Align > 65536 || (Align & (Align - 1)) != 0)
return UR_RESULT_ERROR_INVALID_VALUE;

ur_platform_handle_t Plt = Context->getPlatform();
Expand Down Expand Up @@ -379,7 +379,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMDeviceAlloc(
// L0 supports alignment up to 64KB and silently ignores higher values.
// We flag alignment > 64KB as an invalid value.
// L0 spec says that alignment values that are not powers of 2 are invalid.
if (Alignment > 65536 || Alignment & (Alignment - 1) != 0)
if (Alignment > 65536 || (Alignment & (Alignment - 1)) != 0)
return UR_RESULT_ERROR_INVALID_VALUE;

ur_platform_handle_t Plt = Device->Platform;
Expand Down Expand Up @@ -480,7 +480,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urUSMSharedAlloc(
// L0 supports alignment up to 64KB and silently ignores higher values.
// We flag alignment > 64KB as an invalid value.
// L0 spec says that alignment values that are not powers of 2 are invalid.
if (Alignment > 65536 || Alignment & (Alignment - 1) != 0)
if (Alignment > 65536 || (Alignment & (Alignment - 1)) != 0)
return UR_RESULT_ERROR_INVALID_VALUE;

ur_platform_handle_t Plt = Device->Platform;
Expand Down

0 comments on commit 47e59a8

Please sign in to comment.