From b51d193a5286ace766d7788736bb41fe3e3722a9 Mon Sep 17 00:00:00 2001 From: Moritz Blumenthal Date: Sat, 7 Sep 2024 18:51:05 +0200 Subject: [PATCH] error for DFT on gpu (Closes ##322) --- src/nufft.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/nufft.c b/src/nufft.c index 554804d85..0f97220a2 100644 --- a/src/nufft.c +++ b/src/nufft.c @@ -95,6 +95,20 @@ int main_nufft(int argc, char* argv[argc]) cmdline(&argc, argv, ARRAY_SIZE(args), args, help_str, ARRAY_SIZE(opts), opts); + if (dft) { + + if (bart_use_gpu) + error("DFT not supported on GPU.\n"); + + num_init(); + + bart_use_gpu = false; + + } else { + + num_init_gpu_support(); + } + if (adjoint && inverse) error("Adjoint and inverse requested at the same time.\n"); @@ -131,8 +145,6 @@ int main_nufft(int argc, char* argv[argc]) coilest_dims[0], coilest_dims[1], coilest_dims[2]); } - num_init_gpu_support(); - long basis_dims[DIMS]; complex float* basis = NULL;