Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MG5aMC/mg5amcnlo
Submodule mg5amcnlo updated 558 files
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,8 @@ namespace mg5amcGpu
m_pHelMEs.reset( new DeviceBufferSimple( nGoodHel * nevt ) );
// ... Create the "many-helicity" super-buffer of nGoodHel ME buffers (dynamically allocated because nGoodHel is determined at runtime)
// ... (calling reset here deletes the previously created "one-helicity" buffers used for helicity filtering)
m_pHelJamps.reset( new DeviceBufferSimple( nGoodHel * CPPProcess::ncolor * mgOnGpu::nx2 * nevt ) );
// all function parameter are type int, the first is casted to size_t to avoid integer overflow if the product is greater than max(int)
m_pHelJamps.reset( new DeviceBufferSimple( static_cast<size_t>( nGoodHel ) * CPPProcess::ncolor * mgOnGpu::nx2 * nevt ) );
#ifdef MGONGPU_SUPPORTS_MULTICHANNEL
// ... Create the "many-helicity" super-buffers of nGoodHel numerator and denominator buffers (dynamically allocated)
// ... (calling reset here deletes the previously created "one-helicity" buffers used for helicity filtering)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace mg5amcCpu
static __device__ inline cxtype_ref
kernelAccessIcolIhelNhel( fptype* buffer, const int icol, const int ihel, const int nhel )
{
const int ncolor = CPPProcess::ncolor; // the number of leading colors
const int nevt = gridDim.x * blockDim.x;
const int ievt = blockDim.x * blockIdx.x + threadIdx.x;
const size_t ncolor = CPPProcess::ncolor; // the number of leading colors
const size_t nevt = gridDim.x * blockDim.x;
const size_t ievt = blockDim.x * blockIdx.x + threadIdx.x;
// (ONE HELICITY) Original "old" striding for CUDA kernels: ncolor separate 2*nevt matrices for each color (ievt last)
//return cxtype_ref( buffer[icol * 2 * nevt + ievt], buffer[icol * 2 * nevt + nevt + ievt] ); // "old"
// (ONE HELICITY) New "new1" striding for cuBLAS: two separate ncolor*nevt matrices for each of real and imag (ievt last)
Expand All @@ -43,9 +43,9 @@ namespace mg5amcCpu
static __device__ inline const cxtype
kernelAccessIcolIhelNhelConst( const fptype* buffer, const int icol, const int ihel, const int nhel )
{
const int ncolor = CPPProcess::ncolor; // the number of leading colors
const int nevt = gridDim.x * blockDim.x;
const int ievt = blockDim.x * blockIdx.x + threadIdx.x;
const size_t ncolor = CPPProcess::ncolor; // the number of leading colors
const size_t nevt = gridDim.x * blockDim.x;
const size_t ievt = blockDim.x * blockIdx.x + threadIdx.x;
// (ONE HELICITY) Original "old" striding for CUDA kernels: ncolor separate 2*nevt matrices for each color (ievt last)
//return cxtype_ref( buffer[icol * 2 * nevt + ievt], buffer[icol * 2 * nevt + nevt + ievt] ); // "old"
// (ONE HELICITY) New "new1" striding for cuBLAS: two separate ncolor*nevt matrices for each of real and imag (ievt last)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
// *** PART 0a - CUDA ***
const int nevt = gpublocks * gputhreads;
gpuMemset( allMEs, 0, nevt * sizeof( fptype ) );
gpuMemset( ghelAllJamps, 0, cNGoodHel * ncolor * mgOnGpu::nx2 * nevt * sizeof( fptype ) );
// all function parameter are type int, the first is casted to size_t to avoid integer overflow if the product is greater than max(int)
gpuMemset( ghelAllJamps, 0, static_cast<size_t>( cNGoodHel ) * ncolor * mgOnGpu::nx2 * nevt * sizeof( fptype ) );
#ifdef MGONGPU_SUPPORTS_MULTICHANNEL
gpuMemset( colAllJamp2s, 0, ncolor * nevt * sizeof( fptype ) );
gpuMemset( ghelAllNumerators, 0, cNGoodHel * nevt * sizeof( fptype ) );
Expand Down
Loading