diff --git a/CHANGELOG b/CHANGELOG index 58dab7774..5f31ca8cf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,13 @@ List of features / changes made / release notes, in reverse chronological order. If not stated, FINUFFT is assumed (up to v 1.3 CUFINUFFT indicated separately). +NEXT VERSION + +* cuFINUFFT interface update: number of nonuniform points M is now a 64-bit integer +as opposed to 32-bit. While this does modify the ABI, most code will just need to +recompile against the new library as compilers will silently upcast any 32-bit +integers to 64-bit when calling cufinufft(f)_setpts. + V 2.2.0 (12/12/23) * MERGE OF CUFINUFFT (GPU CODE) INTO FINUFFT SOURCE TREE: diff --git a/docs/c_gpu.rst b/docs/c_gpu.rst index 9f1914ff2..15bd11bdb 100644 --- a/docs/c_gpu.rst +++ b/docs/c_gpu.rst @@ -36,7 +36,8 @@ Inside our ``main`` function, we first define the problem parameters and some po .. code-block:: c - const int M = 100000, N = 10000; + const int64_t M = 100000; + const int N = 10000; int64_t modes[1] = {N}; @@ -75,7 +76,7 @@ Now the actual work can begin. First, we allocate the host (CPU) arrays and fill srand(0); - for(int j = 0; j < M; ++j) { + for(int64_t j = 0; j < M; ++j) { x[j] = 2 * M_PI * (((float) rand()) / RAND_MAX - 1); c[j] = (2 * ((float) rand()) / RAND_MAX - 1) + I * (2 * ((float) rand()) / RAND_MAX - 1); @@ -134,7 +135,7 @@ If we want, we can complare this to the value obtained using the type-1 NUDFT fo f0 = 0; - for(int j = 0; j < M; ++j) { + for(int64_t j = 0; j < M; ++j) { f0 += c[j] * cexp(I * x[j] * (idx - N / 2)); } @@ -206,10 +207,10 @@ For type 1 these points are "sources", but for type 2, "targets". .. code-block:: c - int cufinufft_setpts(cufinufft_plan plan, int M, double* x, double* y, + int cufinufft_setpts(cufinufft_plan plan, int64_t M, double* x, double* y, double* z, int N, double* s, double* t, double *u) - int cufinufftf_setpts(cufinufftf_plan plan, int M, float* x, float* y, + int cufinufftf_setpts(cufinufftf_plan plan, int64_t M, float* x, float* y, float* z, int N, float* s, float* t, float *u) Input: