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.
1919constexpr size_t NumElements{10 };
2020constexpr size_t NumRepeats{1 };
2121constexpr bool verbose{false };
@@ -24,9 +24,9 @@ template <size_t PatternSize, bool SameValue>
2424int 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