Skip to content

Commit fb8d0df

Browse files
committed
format
1 parent 9775bba commit fb8d0df

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

lib/include/s2fft_callbacks.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
/**
22
* @file s2fft_callbacks.h
33
* @brief CUDA CUFFT callbacks for HEALPix spherical harmonic transforms
4-
*
4+
*
55
* @note CUFFT CALLBACKS DEPRECATED: This implementation no longer uses cuFFT callbacks.
66
* The previous callback-based approach has been replaced with direct kernel launches
7-
* for better performance and maintainability. The files s2fft_callbacks.h and
7+
* for better performance and maintainability. The files s2fft_callbacks.h and
88
* s2fft_callbacks.cc are no longer used and can be considered orphaned.
99
*/
1010

11-
1211
#ifndef _S2FFT_CALLBACKS_CUH_
1312
#define _S2FFT_CALLBACKS_CUH_
1413

lib/include/s2fft_kernels.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ typedef long long int int64;
1212
/**
1313
* @file s2fft_kernels.h
1414
* @brief CUDA kernels for HEALPix spherical harmonic transforms
15-
*
15+
*
1616
* @note CUFT CALLBACKS DEPRECATED: This implementation no longer uses cuFFT callbacks.
1717
* The previous callback-based approach has been replaced with direct kernel launches
18-
* for better performance and maintainability. The files s2fft_callbacks.h and
18+
* for better performance and maintainability. The files s2fft_callbacks.h and
1919
* s2fft_callbacks.cc are no longer used and can be considered orphaned.
2020
*/
2121

lib/src/extensions.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ constexpr bool is_double_v = is_double<T>::value;
7070
*/
7171
template <ffi::DataType T>
7272
ffi::Error healpix_forward(cudaStream_t stream, ffi::Buffer<T> input, ffi::Result<ffi::Buffer<T>> output,
73-
ffi::Result<ffi::Buffer<T>> workspace,
74-
s2fftDescriptor descriptor) {
73+
ffi::Result<ffi::Buffer<T>> workspace, s2fftDescriptor descriptor) {
7574
// Step 1: Determine the complex type based on the XLA data type.
7675
using fft_complex_type = fft_complex_t<T>;
7776
const auto& dim_in = input.dimensions();
@@ -150,8 +149,7 @@ ffi::Error healpix_forward(cudaStream_t stream, ffi::Buffer<T> input, ffi::Resul
150149
*/
151150
template <ffi::DataType T>
152151
ffi::Error healpix_backward(cudaStream_t stream, ffi::Buffer<T> input, ffi::Result<ffi::Buffer<T>> output,
153-
ffi::Result<ffi::Buffer<T>> workspace,
154-
s2fftDescriptor descriptor) {
152+
ffi::Result<ffi::Buffer<T>> workspace, s2fftDescriptor descriptor) {
155153
// Step 1: Determine the complex type based on the XLA data type.
156154
using fft_complex_type = fft_complex_t<T>;
157155
const auto& dim_in = input.dimensions();

lib/src/s2fft_kernels.cu

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ __global__ void spectral_extension(complex* data, complex* output, int nside, in
292292
}
293293
}
294294

295-
296295
/**
297296
* @brief CUDA kernel for FFT shifting and normalization of HEALPix data.
298297
*
@@ -341,15 +340,14 @@ __global__ void shift_normalize_kernel(complex* data, int nside, bool apply_shif
341340
long long int shifted_o = (o + nphi / 2) % nphi;
342341
shifted_o = shifted_o < 0 ? nphi + shifted_o : shifted_o;
343342
long long int dest_p = r_start + shifted_o;
344-
//printf(" -> CUDA: Applying shift: p=%lld, dest_p=%lld, shifted_o=%lld\n", p, dest_p, shifted_o);
343+
// printf(" -> CUDA: Applying shift: p=%lld, dest_p=%lld, shifted_o=%lld\n", p, dest_p, shifted_o);
345344
data[dest_p] = element;
346345
} else {
347346
// Step 4b: Write back to original position
348347
data[p] = element;
349348
}
350349
}
351350

352-
353351
// ============================================================================
354352
// C++ LAUNCH FUNCTIONS
355353
// ============================================================================

0 commit comments

Comments
 (0)