Commit d5791d9f authored by Bram Veenboer's avatar Bram Veenboer

Apply clang formatting

parent 89886092
Pipeline #8180 passed with stages
in 22 minutes and 13 seconds
......@@ -486,7 +486,8 @@ void CUDA::do_transform(DomainAtoDomainB direction) {
device.launch_grid_fft(d_grid, grid_size, direction);
// Perform fft shift and scaling
std::complex<float> scale = (direction == FourierDomainToImageDomain)
std::complex<float> scale =
(direction == FourierDomainToImageDomain)
? std::complex<float>(2.0 / (grid_size * grid_size), 0)
: std::complex<float>(1.0, 1.0);
device.launch_fft_shift(d_grid, nr_correlations, grid_size, scale);
......
......@@ -927,20 +927,17 @@ void InstanceCUDA::launch_grid_fft_unified(unsigned long size,
}
}
void InstanceCUDA::launch_fft_shift(cu::DeviceMemory& d_data,
int batch, long size,
std::complex<float> scale)
{
void InstanceCUDA::launch_fft_shift(cu::DeviceMemory& d_data, int batch,
long size, std::complex<float> scale) {
const void* parameters[] = {&size, d_data, &scale};
dim3 grid(batch, ceil(size/2.0));
dim3 grid(batch, ceil(size / 2.0));
dim3 block(128);
UpdateData* data =
get_update_data(get_event(), powerSensor, report, &Report::update_fft_shift);
UpdateData* data = get_update_data(get_event(), powerSensor, report,
&Report::update_fft_shift);
start_measurement(data);
executestream->launchKernel(*function_fft_shift, grid, block, 0,
parameters);
executestream->launchKernel(*function_fft_shift, grid, block, 0, parameters);
end_measurement(data);
}
......
......@@ -87,8 +87,8 @@ class InstanceCUDA : public KernelsInstance {
Array3D<std::complex<float>>& grid,
DomainAtoDomainB direction);
void launch_fft_shift(cu::DeviceMemory& d_data, int batch,
long size, std::complex<float> scale = {1.0, 1.0});
void launch_fft_shift(cu::DeviceMemory& d_data, int batch, long size,
std::complex<float> scale = {1.0, 1.0});
void launch_adder(int nr_subgrids, long grid_size, int subgrid_size,
cu::DeviceMemory& d_metadata, cu::DeviceMemory& d_subgrid,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment