Skip to content

Commit c8f5bfe

Browse files
committed
src/spreadinterp.cpp
1 parent 339b02c commit c8f5bfe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/spreadinterp.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,8 @@ FINUFFT_NEVER_INLINE static int interpSorted_kernel(
482482
timer.start();
483483
#pragma omp parallel num_threads(nthr)
484484
{
485-
#define CHUNKSIZE 16 // Chunks of Type 2 targets (Ludvig found by expt)
485+
static constexpr auto CHUNKSIZE = 16; // Chunks of Type 2 targets (Ludvig found by
486+
// expt)
486487
BIGINT jlist[CHUNKSIZE];
487488
FLT xjlist[CHUNKSIZE], yjlist[CHUNKSIZE], zjlist[CHUNKSIZE];
488489
FLT outbuf[2 * CHUNKSIZE];
@@ -1109,7 +1110,7 @@ void interp_cube(FLT *FINUFFT_RESTRICT target, const FLT *du, const FLT *ker1,
11091110
// no wrapping: avoid ptrs (by far the most common case)
11101111
// store a horiz line (interleaved real,imag)
11111112
// initialize line with zeros; hard to avoid here, but overhead small in 3D
1112-
std::array<FLT, 2 * MAX_NSPREAD> line{0};
1113+
alignas(alignment) std::array<FLT, 2 * ns> line{0};
11131114
// co-add y and z contributions to line in x; do not apply x kernel yet
11141115
// This is expensive innermost loop
11151116
for (uint8_t dz{0}; dz < ns; ++dz) {

0 commit comments

Comments
 (0)