summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2019-02-08 13:08:00 -0500
committerJaron Kent-Dobias <jaron@kent-dobias.com>2019-02-08 13:08:00 -0500
commit48d336aa95989ed796f8f2f88dd8a51781e19771 (patch)
tree14a72de2267dd508556deaa281511e70f6085f9e
parentc80bee0ea904d06c0ecfedb407bc018ba506cbe8 (diff)
downloadfuse_networks-48d336aa95989ed796f8f2f88dd8a51781e19771.tar.gz
fuse_networks-48d336aa95989ed796f8f2f88dd8a51781e19771.tar.bz2
fuse_networks-48d336aa95989ed796f8f2f88dd8a51781e19771.zip
mx and my by default are powers of two for fourier efficiency
-rw-r--r--src/fracture.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/fracture.cpp b/src/fracture.cpp
index ec00b89..595cf1d 100644
--- a/src/fracture.cpp
+++ b/src/fracture.cpp
@@ -57,7 +57,11 @@ int main(int argc, char* argv[]) {
cholmod_common c;
CHOL_F(start)(&c);
- ma meas(Lx, Ly, 4*ceil(Lx), 4*ceil(Ly), beta, 4);
+ // fourier transforms of powers of two are faster
+ unsigned Mx = pow(2, ceil(log2(4*Lx)));
+ unsigned My = pow(2, ceil(log2(4*Ly)));
+
+ ma meas(Lx, Ly, Mx, My, beta, 4);
randutils::auto_seed_128 seeds;
std::mt19937 rng{seeds};