From 7c2f45c0b5162e950d5c06b5e70400ca67f1ba0c Mon Sep 17 00:00:00 2001 From: Peter Willendrup Date: Wed, 23 Oct 2024 20:00:23 +0200 Subject: [PATCH] For compilation for GPU hardware, drop all tau_lists --- mcstas-comps/samples/Single_crystal.comp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mcstas-comps/samples/Single_crystal.comp b/mcstas-comps/samples/Single_crystal.comp index 899eec28e..2f7775f92 100644 --- a/mcstas-comps/samples/Single_crystal.comp +++ b/mcstas-comps/samples/Single_crystal.comp @@ -1080,8 +1080,10 @@ DECLARE struct hkl_info_struct hkl_info; off_struct offdata; struct hkl_data *hkl_list; +#ifndef OPENACC struct tau_data tau_list_initial[MCSX_REFL_SLIST_SIZE]; struct tau_data tau_list[MCSX_REFL_SLIST_SIZE]; +#endif %} INITIALIZE @@ -1382,16 +1384,16 @@ TRACE /* (2). Intersection of Ewald sphere with reciprocal lattice points */ double coh_xsect = 0, coh_refl = 0; - /* in case we use 'SPLIT' then consecutive neutrons can be identical when entering here - and we may skip the hkl_search call. One tau_list is reserved for data for the initial - ray results so that it potentially can be reused later. */ - if (event_counter==0) { - T = tau_list_initial; - } else { - T = tau_list; - } #ifndef OPENACC + /* in case we use 'SPLIT' then consecutive neutrons can be identical when entering here + and we may skip the hkl_search call. One tau_list is reserved for data for the initial + ray results so that it potentially can be reused later. */ + if (event_counter==0) { + T = tau_list_initial; + } else { + T = tau_list; + } if (order==1 && fabs(kix - hkl_info.kix) < deltak && fabs(kiy - hkl_info.kiy) < deltak && fabs(kiz - hkl_info.kiz) < deltak) {