@@ -447,7 +447,7 @@ namespace mg5amcCpu
447447 gpuMemset ( allMEs, 0 , maxtry * sizeof ( fptype ) );
448448 // NB: color_sum ADDS |M|^2 for one helicity to the running sum of |M|^2 over helicities for the given event(s)
449449#ifdef MGONGPU_SUPPORTS_MULTICHANNEL
450- constexpr fptype_sv* allJamp2s = nullptr ; // no need for color selection during helicity filtering
450+ constexpr fptype_sv* allJamp2s = nullptr ; // no need for color selection during helicity filtering
451451 gpuLaunchKernel ( calculate_jamps, gpublocks, gputhreads, ihel, allmomenta, allcouplings, allJamps, false , allNumerators, allDenominators, allJamp2s, gpublocks * gputhreads );
452452#else
453453 gpuLaunchKernel ( calculate_jamps, gpublocks, gputhreads, ihel, allmomenta, allcouplings, allJamps, gpublocks * gputhreads );
@@ -603,9 +603,10 @@ namespace mg5amcCpu
603603 {
604604 fptype* hAllDenominators = ghelAllDenominators + ighel * nevt;
605605 totAllDenominators[ievt] += hAllDenominators[ievt];
606- fptype* hAllNumerators = ghelAllNumerators + (ievt + ighel * nevt) * processConfig::ndiagrams;
606+ fptype* hAllNumerators = ghelAllNumerators + ( ievt + ighel * nevt ) * processConfig::ndiagrams;
607607 fptype* firstNumerator = ghelAllNumerators + ievt * processConfig::ndiagrams;
608- for ( int idiag = 0 ; idiag < processConfig::ndiagrams; ++idiag) {
608+ for ( int idiag = 0 ; idiag < processConfig::ndiagrams; ++idiag)
609+ {
609610 firstNumerator[idiag] += hAllNumerators[idiag];
610611 }
611612 }
@@ -663,8 +664,8 @@ namespace mg5amcCpu
663664 const fptype* allrnddiagram, // input: random numbers[nevt] for diagram selection
664665 const unsigned int * allChannelIds, // input: multichannel channelIds[nevt] (1 to #diagrams); nullptr to disable SDE enhancement (fix #899/#911)
665666 const fptype_sv* allJamp2s, // input: jamp2[ncolor][nevt] for color choice (nullptr if disabled)
666- const fptype* allNumerators,
667- const fptype* allDenominators,
667+ const fptype* allNumerators, // input: all numerators
668+ const fptype* allDenominators, // input: all denominators
668669 const int nevt ) // input: #events (for cuda: nevt == ndim == gpublocks*gputhreads)
669670 {
670671 const int ievt = blockDim.x * blockIdx.x + threadIdx.x ; // index of event (thread)
@@ -673,20 +674,19 @@ namespace mg5amcCpu
673674 // Event-by-event random choice of color #402
674675
675676 // Event-by-event random choice of channel
676- if ( allrnddiagram != nullptr ) {
677+ if ( allrnddiagram != nullptr )
678+ {
677679 fptype numerator_sum = 0 ., normalization = 0 .;
678680 for ( unsigned int ichan = 0 ; ichan < mgOnGpu::nchannels; ichan++ )
679681 {
680- if (mgOnGpu::channel2iconfig[ichan] == -1 ) continue ;
681- normalization += allNumerators[
682- ievt * processConfig::ndiagrams + ichan];
682+ if ( mgOnGpu::channel2iconfig[ichan] == -1 ) continue ;
683+ normalization += allNumerators[ievt * processConfig::ndiagrams + ichan];
683684 }
684685 channelId = mgOnGpu::nchannels;
685686 for ( unsigned int ichan = 0 ; ichan < mgOnGpu::nchannels; ichan++ )
686687 {
687- if (mgOnGpu::channel2iconfig[ichan] == -1 ) continue ;
688- numerator_sum += allNumerators[
689- ievt * processConfig::ndiagrams + ichan];
688+ if ( mgOnGpu::channel2iconfig[ichan] == -1 ) continue ;
689+ numerator_sum += allNumerators[ievt * processConfig::ndiagrams + ichan];
690690 if ( allrnddiagram[ievt] < numerator_sum / normalization )
691691 {
692692 channelId = ichan + 1 ;
0 commit comments