Skip to content

Commit

Permalink
Apply review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
rafbiels committed Nov 15, 2024
1 parent 16eb5fc commit 56e7eb4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sycl/test-e2e/USM/fill_any_size.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <sycl/detail/core.hpp>
#include <sycl/usm.hpp>

constexpr size_t MaxPatternSize{32}; // bytes
constexpr size_t MaxPatternSize{32}; // Bytes.
constexpr size_t NumElements{10};
constexpr size_t NumRepeats{1};
constexpr bool verbose{false};
Expand All @@ -24,9 +24,9 @@ template <size_t PatternSize, bool SameValue>
int test(sycl::queue &q, uint8_t firstValue = 0) {
using T = std::array<uint8_t, PatternSize>;
T value{};
for (unsigned int i{0}; i < PatternSize; ++i) {
for (size_t i{0}; i < PatternSize; ++i) {
if constexpr (SameValue) {
value[0] = firstValue;
value[i] = firstValue;
} else {
value[i] = firstValue + i;
}
Expand All @@ -40,8 +40,8 @@ int test(sycl::queue &q, uint8_t firstValue = 0) {
std::array<T, NumElements> host{};
q.copy<T>(dptr, host.data(), NumElements).wait();
bool pass{true};
for (unsigned int i{0}; i < NumElements; ++i) {
for (unsigned int j{0}; j < PatternSize; ++j) {
for (size_t i{0}; i < NumElements; ++i) {
for (size_t j{0}; j < PatternSize; ++j) {
if (host[i][j] != value[j]) {
pass = false;
}
Expand Down

0 comments on commit 56e7eb4

Please sign in to comment.