Skip to content

Commit a3f4cec

Browse files
committed
windows omp wants signed loop variables
1 parent 6e51bf1 commit a3f4cec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/spreadinterp.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,12 @@ FINUFFT_NEVER_INLINE static int interpSorted_kernel(
497497
auto *FINUFFT_RESTRICT ker3 = kernel_values.data() + 2 * MAX_NSPREAD;
498498

499499
// Loop over interpolation chunks
500-
#pragma omp for schedule(dynamic, 1000) // assign threads to NU targ pts:
501-
for (UBIGINT i = 0; i < M; i += CHUNKSIZE) // main loop over NU trgs, interp each from
502-
// U
503-
{
500+
#pragma omp for schedule(dynamic, 1000) // assign threads to NU targ pts:
501+
// main loop over NU trgs, interp each from U
502+
// (note: windows omp doesn't like unsigned loop vars)
503+
for (BIGINT i = 0; i < M; i += CHUNKSIZE) {
504504
// Setup buffers for this chunk
505-
const auto bufsize = (i + CHUNKSIZE > M) ? M - i : CHUNKSIZE;
505+
const UBIGINT bufsize = (i + CHUNKSIZE > M) ? M - i : CHUNKSIZE;
506506
for (int ibuf = 0; ibuf < bufsize; ibuf++) {
507507
UBIGINT j = sort_indices[i + ibuf];
508508
jlist[ibuf] = j;

0 commit comments

Comments
 (0)