Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Henning Fehrmann
NVidia_AMD_Bench
Commits
8304a59f
Commit
8304a59f
authored
Mar 05, 2021
by
Henning Fehrmann
Browse files
need to do the data copying after the data generation. Required for later tests
parent
50da3839
Changes
1
Hide whitespace changes
Inline
Side-by-side
fftw.c
View file @
8304a59f
...
...
@@ -75,8 +75,6 @@ run_test
__COMPLEX8__
*
hA
;
__MALLOC
(
hA
,
sizeof
(
*
hA
)
*
N
*
T
);
// Copy data to device
__ASSERT
(
__PREFIX
(
Memcpy
)(
A
,
hA
,
sizeof
(
*
hA
)
*
N
,
__PREFIX
(
MemcpyHostToDevice
)));
// Create FFT plan
__FFTW_PLAN
plan
;
size_t
length
=
N
;
...
...
@@ -121,20 +119,21 @@ run_test
);
#endif
prepare_data
(
hA
,
N
*
T
);
for
(
int
r
=
0
;
r
<
10
;
r
++
)
// Copy data to device
__ASSERT
(
__PREFIX
(
Memcpy
)(
A
,
hA
,
sizeof
(
*
hA
)
*
N
,
__PREFIX
(
MemcpyHostToDevice
)));
sprintf
(
mes
,
"T = %zu n = %zu
\t
1nd total %d rounds."
,
T
,
N
,
rep
);
timer_start
(
timer
,
mes
);
for
(
int
r
=
0
;
r
<
rep
;
r
++
)
{
// Execute plan
sprintf
(
mes
,
"T = %zu n = %zu
\t
round %d."
,
T
,
N
,
r
);
timer_start
(
timer
,
mes
);
#ifdef ROC
rocfft_execute
(
plan
,
(
void
**
)
&
A
,
NULL
,
NULL
);
#elif CUDA
cufftExecC2C
(
plan
,
A
,
A
,
CUFFT_FORWARD
);
#endif
__PREFIX
(
DeviceSynchronize
)();
timer_stop
(
timer
);
}
timer_stop
(
timer
);
// Destroy plan
__DESTROY_PLAN
(
plan
);
...
...
@@ -152,7 +151,7 @@ main
(
)
{
int
rep
=
1
;
int
rep
=
1
000
;
int
t_min
=
8
;
int
t_max
=
11
;
int
n_min
=
11
;
...
...
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