Skip to content

Commit 603007e

Browse files
committed
fix formatting
1 parent 2fc63c0 commit 603007e

File tree

4 files changed

+465
-459
lines changed

4 files changed

+465
-459
lines changed

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_function_definitions.inc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -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;

epochX/cudacpp/CODEGEN/PLUGIN/CUDACPP_SA_OUTPUT/madgraph/iolibs/template_files/gpu/process_sigmaKin_function.inc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
fptype* denominators = DEN_ACCESS::ieventAccessRecord( allDenominators, ievt0 );
3636
fptype_sv* numerators_sv = NUM_ACCESS::kernelAccessP( numerators );
3737
fptype_sv& denominators_sv = DEN_ACCESS::kernelAccess( denominators );
38-
for( int i = 0; i < processConfig::ndiagrams; ++i ) {
38+
for( int i = 0; i < processConfig::ndiagrams; ++i )
39+
{
3940
numerators_sv[i] = fptype_sv{ 0 };
4041
}
4142
denominators_sv = fptype_sv{ 0 };
@@ -187,8 +188,9 @@
187188
#else
188189
const int vecsize = neppV;
189190
#endif
190-
unsigned int channelIdVec[vecsize];
191-
if (allChannelIds != nullptr) {
191+
unsigned int channelIdVec[vecsize];
192+
if (allChannelIds != nullptr)
193+
{
192194
for( int ieppV = 0; ieppV < vecsize; ++ieppV )
193195
{
194196
const int ievt = ievt00 + ieppV;
@@ -204,18 +206,16 @@
204206
fptype numerator_sum = 0., normalization = 0.;
205207
for( unsigned int ichan = 0; ichan < mgOnGpu::nchannels; ichan++ )
206208
{
207-
if (mgOnGpu::channel2iconfig[ichan] == -1) continue;
208-
normalization += allNumerators[
209-
ievt / neppV * neppV * processConfig::ndiagrams +
210-
ichan * neppV + ieppV %% neppV];
209+
if( mgOnGpu::channel2iconfig[ichan] == -1 ) continue;
210+
normalization += allNumerators[ievt / neppV * neppV * processConfig::ndiagrams +
211+
ichan * neppV + ieppV %% neppV];
211212
}
212213
channelIdVec[ieppV] = mgOnGpu::nchannels;
213214
for( unsigned int ichan = 0; ichan < mgOnGpu::nchannels; ichan++ )
214215
{
215-
if (mgOnGpu::channel2iconfig[ichan] == -1) continue;
216-
numerator_sum += allNumerators[
217-
ievt / neppV * neppV * processConfig::ndiagrams +
218-
ichan * neppV + ieppV %% neppV];
216+
if( mgOnGpu::channel2iconfig[ichan] == -1 ) continue;
217+
numerator_sum += allNumerators[ievt / neppV * neppV * processConfig::ndiagrams +
218+
ichan * neppV + ieppV %% neppV];
219219
if( allrnddiagram[ievt] < numerator_sum / normalization )
220220
{
221221
channelIdVec[ieppV] = ichan + 1;
@@ -259,7 +259,7 @@
259259
else
260260
targetamp[icolC] = targetamp[icolC - 1];
261261
if( mgOnGpu::icolamp[iconfig - 1][icolC] ) targetamp[icolC] +=
262-
jamp2_sv[icolC + ncolor * (ieppV / neppV)][ieppV %% neppV];
262+
jamp2_sv[icolC + ncolor * (ieppV / neppV)][ieppV %% neppV];
263263
}
264264
const int ievt = ievt00 + ieppV;
265265
//printf( "sigmaKin: ievt=%%4d rndcol=%%f\n", ievt, allrndcol[ievt] );

0 commit comments

Comments
 (0)