Changed interface of newRandomFourier to avoid generating copies.
This commit is contained in:
parent
ed1fede33d
commit
7ad4911872
5 changed files with 22 additions and 32 deletions
|
@ -47,7 +47,7 @@ target_link_libraries(testBSP ${tolink})
|
|||
if (FFTW3_FOUND AND FFTW3F_FOUND AND EIGEN3_FOUND)
|
||||
add_executable(test_fft_calls test_fft_calls.cpp)
|
||||
target_link_libraries(test_fft_calls ${tolink} ${FFTW3_LIBRARIES} ${FFTW3F_LIBRARIES})
|
||||
endif (FFTW3_FOUND AND EIGEN3_FOUND)
|
||||
endif (FFTW3_FOUND AND FFTW3F_FOUND AND EIGEN3_FOUND)
|
||||
|
||||
if (SHARP_LIBRARY AND SHARP_INCLUDE_PATH AND EIGEN3_FOUND)
|
||||
include_directories(${SHARP_INCLUDE_PATH})
|
||||
|
|
|
@ -37,8 +37,7 @@ void test_2d(int Nx, int Ny)
|
|||
dft.realSpace().scale(2.0);
|
||||
dft.fourierSpace().scale(0.2);
|
||||
|
||||
typename SpectrumFunction<T>::FourierMapPtr m = spectrum.newRandomFourier(rng, dft.fourierSpace());
|
||||
dft.fourierSpace() = *m.get();
|
||||
spectrum.newRandomFourier(rng, dft.fourierSpace());
|
||||
dft.synthesis();
|
||||
|
||||
uint32_t dims[2] = { Ny, Nx };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue