Closed valassi closed 5 months ago
Just a reminder from @oliviermattelaer ' s suggestion in https://github.com/madgraph5/madgraph4gpu/issues/765#issuecomment-1854069615
if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); into something like channelids_sv = CHANNEL_ACCESS::kernelAccess( pchannelIds ); // the 4 channels in the SIMD vector bool_sv mask_sv = ( channelids_sv == 1 ); numerators_sv += mask_sv * cxabs2( amp_sv[0] ); if( pchannelIds != nullptr ) denominators_sv += cxabs2( amp_sv[0] ); Please put comment around those lines since you pass from an easy to read code to a code that I simply do not understand (which I'm fine with obviously but I would be nice to keep readibility whenever you have those cryptic accessor.
if( channelId == 1 ) numerators_sv += cxabs2( amp_sv[0] ); if( channelId != 0 ) denominators_sv += cxabs2( amp_sv[0] ); into something like channelids_sv = CHANNEL_ACCESS::kernelAccess( pchannelIds ); // the 4 channels in the SIMD vector bool_sv mask_sv = ( channelids_sv == 1 ); numerators_sv += mask_sv * cxabs2( amp_sv[0] ); if( pchannelIds != nullptr ) denominators_sv += cxabs2( amp_sv[0] );
Please put comment around those lines since you pass from an easy to read code to a code that I simply do not understand (which I'm fine with obviously but I would be nice to keep readibility whenever you have those cryptic accessor.
this is already implemented in the channelids code
Just a reminder from @oliviermattelaer ' s suggestion in https://github.com/madgraph5/madgraph4gpu/issues/765#issuecomment-1854069615