Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and matmanc committed Jun 23, 2023
1 parent 7481d06 commit ef7cb5f
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions tests/convolution/convolution.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,21 @@ int main(int argc, char *argv[]) {
cufftComplex *out = out_host;
generateSignal(in, fftSize);


my_stream.memcpyHtoDAsync(in_dev, in, arraySize);
cufft::FFT<cufftComplex, cufftComplex, 2> fft{fftSize, fftSize};
fft.setStream(my_stream);
fft.execute(in_dev, out_dev, CUFFT_FORWARD);
my_stream.memcpyDtoHAsync(out_host, out_dev, arraySize);
my_stream.synchronize();


fft.execute(out_dev, in_dev, CUFFT_INVERSE);
my_stream.memcpyDtoHAsync(out_testing, in_dev, arraySize);
my_stream.synchronize();

ArrayComparisonStats result = compareResults(in,
out_testing,
fftSize,
1.e-6);

std::cout<< "Total difference is "<< result.totalDifference << "\n"<<
"Mean difference is "<< result.meanDifference << "\n"<<
"Total count is "<< result.exceedingCount << "\n"<<
"Percentage count is "<< result.exceedingFraction << "\n";
ArrayComparisonStats result = compareResults(in, out_testing, fftSize, 1.e-6);

std::cout << "Total difference is " << result.totalDifference << "\n"
<< "Mean difference is " << result.meanDifference << "\n"
<< "Total count is " << result.exceedingCount << "\n"
<< "Percentage count is " << result.exceedingFraction << "\n";
}

0 comments on commit ef7cb5f

Please sign in to comment.