From 37dc1ab147ccc807f9bf97cc981906cc4fbcf2ac Mon Sep 17 00:00:00 2001 From: Aniket Sen Date: Tue, 6 Feb 2024 14:53:09 +0100 Subject: [PATCH] added interface for saving gauge back to host --- quda_interface.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++ quda_interface.h | 1 + 2 files changed, 119 insertions(+) diff --git a/quda_interface.c b/quda_interface.c index 786346218..c84a8c275 100644 --- a/quda_interface.c +++ b/quda_interface.c @@ -584,6 +584,86 @@ void reorder_gauge_toQuda( const su3 ** const gaugefield, const CompressionType tm_stopwatch_pop(&g_timers, 0, 0, "TM_QUDA"); } +void reorder_gauge_fromQuda( const su3 ** const gaugefield, const CompressionType compression ) { + tm_stopwatch_push(&g_timers, __func__, ""); + +#ifdef TM_USE_OMP +#pragma omp parallel + { +#endif + _Complex double tmpcplx; + + size_t gSize = (gauge_param.cpu_prec == QUDA_DOUBLE_PRECISION) ? sizeof(double) : sizeof(float); + + // now copy and reorder +#ifdef TM_USE_OMP + #pragma omp for collapse(4) +#endif + for( int x0=0; x0