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
|
@ -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