From 8e3a2150df5600bc7964782812af10a64ad427a5 Mon Sep 17 00:00:00 2001 From: David Hammer <dhammer@mailbox.org> Date: Tue, 7 Dec 2021 20:04:34 +0100 Subject: [PATCH] Fix indentation --- src/calng/kernels/agipd_gpu.cu | 40 +++++++++++++++++----------------- src/calng/kernels/dssc_gpu.cu | 6 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/calng/kernels/agipd_gpu.cu b/src/calng/kernels/agipd_gpu.cu index d5d5ca02..f2304785 100644 --- a/src/calng/kernels/agipd_gpu.cu +++ b/src/calng/kernels/agipd_gpu.cu @@ -11,20 +11,20 @@ extern "C" { Will convert to output dtype for output */ __global__ void correct(const {{input_data_dtype}}* data, - const unsigned short* cell_table, - const unsigned char corr_flags, - // default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD) - const unsigned char default_gain, - const float* threshold_map, - const float* offset_map, - const float* rel_gain_pc_map, - const float* md_additional_offset, - const float* rel_gain_xray_map, - const float g_gain_value, - const unsigned int* bad_pixel_map, - const float bad_pixel_mask_value, - float* gain_map, // TODO: more compact yet plottable representation - {{output_data_dtype}}* output) { + const unsigned short* cell_table, + const unsigned char corr_flags, + // default_gain can be 0, 1, or 2, and is relevant for fixed gain mode (no THRESHOLD) + const unsigned char default_gain, + const float* threshold_map, + const float* offset_map, + const float* rel_gain_pc_map, + const float* md_additional_offset, + const float* rel_gain_xray_map, + const float g_gain_value, + const unsigned int* bad_pixel_map, + const float bad_pixel_mask_value, + float* gain_map, // TODO: more compact yet plottable representation + {{output_data_dtype}}* output) { const size_t X = {{pixels_x}}; const size_t Y = {{pixels_y}}; const size_t input_cells = {{data_memory_cells}}; @@ -83,13 +83,13 @@ extern "C" { unsigned char gain = default_gain; if (corr_flags & THRESHOLD) { const float threshold_0 = threshold_map[0 * threshold_map_stride_threshold + - map_cell * threshold_map_stride_cell + - y * threshold_map_stride_y + - x * threshold_map_stride_x]; + map_cell * threshold_map_stride_cell + + y * threshold_map_stride_y + + x * threshold_map_stride_x]; const float threshold_1 = threshold_map[1 * threshold_map_stride_threshold + - map_cell * threshold_map_stride_cell + - y * threshold_map_stride_y + - x * threshold_map_stride_x]; + map_cell * threshold_map_stride_cell + + y * threshold_map_stride_y + + x * threshold_map_stride_x]; // could consider making this const using ternaries / tiny function if (raw_gain_val <= threshold_0) { gain = 0; diff --git a/src/calng/kernels/dssc_gpu.cu b/src/calng/kernels/dssc_gpu.cu index a5bf8d8e..a35eed98 100644 --- a/src/calng/kernels/dssc_gpu.cu +++ b/src/calng/kernels/dssc_gpu.cu @@ -12,10 +12,10 @@ extern "C" { Shape of offset constant: x, y, memory cell */ __global__ void correct(const {{input_data_dtype}}* data, // shape: memory cell, 1, y, x - const unsigned short* cell_table, + const unsigned short* cell_table, const unsigned char corr_flags, - const float* offset_map, - {{output_data_dtype}}* output) { + const float* offset_map, + {{output_data_dtype}}* output) { const size_t X = {{pixels_x}}; const size_t Y = {{pixels_y}}; const size_t memory_cells = {{data_memory_cells}}; -- GitLab