2011-12-03 00:02:36 +08:00
|
|
|
// **************************************************************************
|
|
|
|
// device.cu
|
|
|
|
// -------------------
|
|
|
|
// W. Michael Brown (ORNL)
|
|
|
|
//
|
|
|
|
// Device code for device information
|
|
|
|
//
|
|
|
|
// __________________________________________________________________________
|
|
|
|
// This file is part of the LAMMPS Accelerator Library (LAMMPS_AL)
|
|
|
|
// __________________________________________________________________________
|
|
|
|
//
|
2016-07-02 07:27:26 +08:00
|
|
|
// begin :
|
2011-12-03 00:02:36 +08:00
|
|
|
// email : brownw@ornl.gov
|
2018-11-27 06:03:48 +08:00
|
|
|
// ***************************************************************************
|
2011-12-03 00:02:36 +08:00
|
|
|
|
|
|
|
#ifdef NV_KERNEL
|
|
|
|
#include "lal_preprocessor.h"
|
|
|
|
#endif
|
|
|
|
|
2016-07-02 07:27:26 +08:00
|
|
|
__kernel void kernel_zero(__global int *restrict mem,
|
2012-09-21 23:57:23 +08:00
|
|
|
int numel) {
|
2011-12-03 00:02:36 +08:00
|
|
|
int ii=GLOBAL_ID_X;
|
2016-07-02 07:27:26 +08:00
|
|
|
|
2011-12-03 00:02:36 +08:00
|
|
|
if (ii<numel)
|
|
|
|
mem[ii]=0;
|
|
|
|
}
|
|
|
|
|
|
|
|
__kernel void kernel_info(__global int *info) {
|
|
|
|
info[0]=ARCH;
|
|
|
|
info[1]=MEM_THREADS;
|
|
|
|
info[2]=WARP_SIZE;
|
|
|
|
info[3]=THREADS_PER_ATOM;
|
|
|
|
info[4]=PPPM_MAX_SPLINE;
|
|
|
|
info[5]=PPPM_BLOCK_1D;
|
|
|
|
info[6]=BLOCK_PAIR;
|
|
|
|
info[7]=MAX_SHARED_TYPES;
|
|
|
|
info[8]=BLOCK_CELL_2D;
|
|
|
|
info[9]=BLOCK_CELL_ID;
|
|
|
|
info[10]=BLOCK_NBOR_BUILD;
|
|
|
|
info[11]=BLOCK_BIO_PAIR;
|
|
|
|
info[12]=MAX_BIO_SHARED_TYPES;
|
|
|
|
info[13]=THREADS_PER_CHARGE;
|
2012-09-21 23:57:23 +08:00
|
|
|
info[14]=BLOCK_ELLIPSE;
|
2011-12-03 00:02:36 +08:00
|
|
|
}
|
2018-11-27 06:03:48 +08:00
|
|
|
|