Skip to content

Commit 3f1cb46

Browse files
committed
Apply review suggestions
1 parent fc676e8 commit 3f1cb46

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sycl/test-e2e/USM/fill_any_size.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <sycl/detail/core.hpp>
1616
#include <sycl/usm.hpp>
1717

18-
constexpr size_t MaxPatternSize{32}; // bytes
18+
constexpr size_t MaxPatternSize{32}; // Bytes.
1919
constexpr size_t NumElements{10};
2020
constexpr size_t NumRepeats{1};
2121
constexpr bool verbose{false};
@@ -24,9 +24,9 @@ template <size_t PatternSize, bool SameValue>
2424
int test(sycl::queue &q, uint8_t firstValue = 0) {
2525
using T = std::array<uint8_t, PatternSize>;
2626
T value{};
27-
for (unsigned int i{0}; i < PatternSize; ++i) {
27+
for (size_t i{0}; i < PatternSize; ++i) {
2828
if constexpr (SameValue) {
29-
value[0] = firstValue;
29+
value[i] = firstValue;
3030
} else {
3131
value[i] = firstValue + i;
3232
}
@@ -40,8 +40,8 @@ int test(sycl::queue &q, uint8_t firstValue = 0) {
4040
std::array<T, NumElements> host{};
4141
q.copy<T>(dptr, host.data(), NumElements).wait();
4242
bool pass{true};
43-
for (unsigned int i{0}; i < NumElements; ++i) {
44-
for (unsigned int j{0}; j < PatternSize; ++j) {
43+
for (size_t i{0}; i < NumElements; ++i) {
44+
for (size_t j{0}; j < PatternSize; ++j) {
4545
if (host[i][j] != value[j]) {
4646
pass = false;
4747
}

0 commit comments

Comments
 (0)