Skip to content

Commit

Permalink
[gqttq] in CODEGEN sigmakin template, replace nprocesses by codegen_n…
Browse files Browse the repository at this point in the history
…proc and codegen_procid (for sanity checks only madgraph5/madgraph4gpu#272 and madgraph5/madgraph4gpu#619)
  • Loading branch information
valassi committed Apr 5, 2023
1 parent ba95b86 commit c123859
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,17 @@ namespace mg5amcCpu
{
mgDebugInitialise();

// SANITY CHECKS for cudacpp code generation (see issues #272 and #343 and PRs #619 and #626)
// - codegen_nproc (a.k.a. 'nprocesses') has always been found equal to 1 for all processes generated so far
// - codegen_procid corresponds to the index of DSIG1 Fortran functions (cudacpp is unable to handle DSIG2)
// NB: neither codegen_nproc nor codegen_procid are used anywhere else in the code
constexpr int codegen_nproc = %(nproc)i;
static_assert( codegen_nproc == 1, "Assume codegen_nproc == 1" );
constexpr int codegen_procid = %(proc_id)i;
static_assert( codegen_procid == 1, "Assume codegen_procid == 1" );

// Denominators: spins, colors and identical particles
constexpr int nprocesses = %(nproc)i;
static_assert( nprocesses == 1, "Assume nprocesses == 1" ); // FIXME (#343): assume nprocesses == 1
constexpr int helcolDenominators[%(nproc)i] = { %(den_factors)s };
constexpr int helcolDenominators[1] = { %(den_factors)s };

#ifdef __CUDACC__
// Remember: in CUDA this is a kernel for one event, in c++ this processes n events
Expand Down

0 comments on commit c123859

Please # to comment.