Skip to content

Commit

Permalink
[pp4t] in codegen, first attempt to backport madgraph5/madgraph4gpu#644
Browse files Browse the repository at this point in the history
…, move nwf from src/mgOnGpuConfig.h to SubProcesses/P1*/CPPProcess.h

(NB note the difference between nwavefun and nwavefuncs - trailing s - in python!?)
  • Loading branch information
valassi committed May 22, 2023
1 parent 36affdb commit 924d311
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions madgraph/iolibs/template_files/gpu/mgOnGpuConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,6 @@ namespace mgOnGpu

const int nw6 = %(wavefuncsize)d; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors)

const int nwf = %(nwavefunc)d; // #wavefunctions = #external (npar) + #internal: e.g. 5 for e+ e- -> mu+ mu- (1 internal is gamma or Z)

// --- Platform-specific software implementation details

// Maximum number of blocks per grid
Expand Down
6 changes: 5 additions & 1 deletion madgraph/iolibs/template_files/gpu/process_class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@

// Hardcoded parameters for this process (constant class variables)
// [NB: this class assumes nprocesses==1 i.e. a single DSIG1 and no DSIG2 in Fortran (#272 and #343)]
// [NB: these parameters (e.g. nwf) are P1-specific, i.e. they are different for different P1 subdirectories (#644)]
static const int nwf = %(nwavefunc)d; // #wavefunctions = #external (npar) + #internal: e.g. 5 for e+ e- -> mu+ mu- (1 internal is gamma or Z)

// Other variables of this instance (???)
//static const int ninitial = mgOnGpu::npari;
//static const int nexternal = %(nexternal)d; // mgOnGpu::npar (nexternal was nioparticles)
//static const int nwavefuncs = %(nwavefuncs)d; // mgOnGpu::nwf
//static const int nwavefuncs = %(nwavefuncs)d; // (?!?! this is not nwf: nwavefuncs vs nwavefunc in python code ?!?!)
//static const int namplitudes = %(namp)d;
//static const int ncomb = %(ncomb)d; // mgOnGpu::ncomb

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ namespace mg5amcCpu
using mgOnGpu::npar; // #particles in total (external = initial + final): e.g. 4 for e+ e- -> mu+ mu-
using mgOnGpu::ncomb; // #helicity combinations: e.g. 16 for e+ e- -> mu+ mu- (2**4 = fermion spin up/down ** npar)

using mgOnGpu::nwf; // #wavefunctions = #external (npar) + #internal: e.g. 5 for e+ e- -> mu+ mu- (1 internal is gamma or Z)
using mgOnGpu::nw6; // dimensions of each wavefunction (HELAS KEK 91-11): e.g. 6 for e+ e- -> mu+ mu- (fermions and vectors)

using CPPProcess::nwf; // #wavefunctions = #external (npar) + #internal: e.g. 5 for e+ e- -> mu+ mu- (1 internal is gamma or Z)

using Parameters_%(model_name)s_dependentCouplings::ndcoup; // #couplings that vary event by event (depend on running alphas QCD)
using Parameters_%(model_name)s_independentCouplings::nicoup; // #couplings that are fixed for all events (do not depend on running alphas QCD)

Expand Down

0 comments on commit 924d311

Please sign in to comment.