Skip to content
Snippets Groups Projects
Commit 2ca700ec authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed Windows build

parent a6373db1
No related branches found
No related tags found
2 merge requests!166Update 0.5.0 -> 0.6.0,!163Added OpenMP for Resize and TopK operators
Pipeline #70800 passed
......@@ -54,7 +54,7 @@ void ResizeImpl_cpu_forward_kernel(
#ifdef _OPENMP
#pragma omp parallel for if (outputLen >= 16)
#endif
for (DimSize_t idxFlatOut = 0; idxFlatOut < outputLen; ++idxFlatOut) {
for (int idxFlatOut = 0; idxFlatOut < static_cast<int>(outputLen); ++idxFlatOut) {
const auto coordOut = Tensor::toCoord(outputDims, idxFlatOut);
auto coordInApprox =
Interpolation::untransformCoordinates(coordOut,
......
......@@ -50,8 +50,8 @@ void TopKImpl_cpu_forward_kernel(int64_t axis,
#ifdef _OPENMP
#pragma omp parallel for collapse(2) if (stride_pre * stride_post >= 16)
#endif
for (std::size_t pre = 0; pre < stride_pre; ++pre) {
for (std::size_t post = 0; post < stride_post; ++post) {
for (int pre = 0; pre < static_cast<int>(stride_pre); ++pre) {
for (int post = 0; post < static_cast<int>(stride_post); ++post) {
const std::size_t idx_i = pre * dim_i * stride_post + post;
const std::size_t idx_o = pre * k * stride_post + post;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment