diff --git a/examples/linear_find/main.cpp b/examples/linear_find/main.cpp index 52290aa45..96e4105bb 100644 --- a/examples/linear_find/main.cpp +++ b/examples/linear_find/main.cpp @@ -133,7 +133,7 @@ inline std::array find_parallel(Iterator first, Iterator la const auto mask = *first == value && !found; if (any_of(mask)) { found |= mask; - for (int i : where(mask)) { + for (std::size_t i : where(mask)) { matches[i] = first; } if (all_of(found)) { diff --git a/examples/matrix/main.cpp b/examples/matrix/main.cpp index 58177b1ac..455bfb8ec 100644 --- a/examples/matrix/main.cpp +++ b/examples/matrix/main.cpp @@ -111,7 +111,7 @@ inline Matrix operator*(const Matrix &a, const Matrix &b) // The iteration over the column index of b and c uses a stride of V::size(). This // enables row-vector loads (from b) and stores (to c). The matrix storage is // padded accordingly, ensuring correct bounds and alignment. - for (int j = 0; j < NN; j += V::size()) { + for (int j = 0; j < NN; j += int(V::size())) { // This temporary variables are used to accumulate the results of the products // producing the new values for the c matrix. This variable is necessary // because we need a V object for data-parallel accumulation. Storing to c @@ -133,7 +133,7 @@ inline Matrix operator*(const Matrix &a, const Matrix &b) } } // This final loop treats the remaining NN - N0 rows. - for (int j = 0; j < NN; j += V::size()) { + for (int j = 0; j < NN; j += int(V::size())) { V c_ij[UnrollOuterloop]; for (int n = N0; n < NN; ++n) { c_ij[n - N0] = a[n][0] * V(&b[0][j], Vc::Aligned);