Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
ResearchAndDevelopment
idg
Commits
d5791d9f
Commit
d5791d9f
authored
Jan 19, 2021
by
Bram Veenboer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply clang formatting
parent
89886092
Pipeline
#8180
passed with stages
in 22 minutes and 13 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
14 deletions
+12
-14
idg-lib/src/CUDA/common/CUDA.cpp
idg-lib/src/CUDA/common/CUDA.cpp
+4
-3
idg-lib/src/CUDA/common/InstanceCUDA.cpp
idg-lib/src/CUDA/common/InstanceCUDA.cpp
+6
-9
idg-lib/src/CUDA/common/InstanceCUDA.h
idg-lib/src/CUDA/common/InstanceCUDA.h
+2
-2
No files found.
idg-lib/src/CUDA/common/CUDA.cpp
View file @
d5791d9f
...
...
@@ -486,9 +486,10 @@ 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
>
(
2.0
/
(
grid_size
*
grid_size
),
0
)
:
std
::
complex
<
float
>
(
1.0
,
1.0
);
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
);
// End measurements
...
...
idg-lib/src/CUDA/common/InstanceCUDA.cpp
View file @
d5791d9f
...
...
@@ -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
);
}
...
...
idg-lib/src/CUDA/common/InstanceCUDA.h
View file @
d5791d9f
...
...
@@ -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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment