MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / Finalize

Function Finalize

Src/FFT/AMReX_FFT.cpp:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37void Finalize ()
38{
39 if (s_initialized == 1)
40 {
41 Clear();
42
43#if defined(AMREX_USE_HIP) && defined(AMREX_USE_FFT)
44 AMREX_ROCFFT_SAFE_CALL(rocfft_cleanup());
45#endif
46 // We are not calling fftw[f]_cleanup_threads and fftw_cleanup here
47 // to deallocate a small amount of persist data used by FFTW. This
48 // can be regarded as a benign memory "leak". Trying to clean up
49 // fftw data here sometimes causes memory issues when application
50 // codes still have ffftw plans to be destroyed.
51 }
52
53 if (s_initialized > 0) { --s_initialized; }
54}
55
56void Clear ()
57{

Callers 1

amrex_fi_finalizeFunction · 0.50

Calls 1

ClearFunction · 0.85

Tested by

no test coverage detected