Commit 8304a59f authored by Henning Fehrmann's avatar Henning Fehrmann
Browse files

need to do the data copying after the data generation. Required for later tests

parent 50da3839
......@@ -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 = 1000;
int t_min = 8;
int t_max = 11;
int n_min = 11;
......
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