Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F82957627
pair_gpu_nbor_kernel.cu
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Sep 14, 10:40
Size
1 KB
Mime Type
text/x-c
Expires
Mon, Sep 16, 10:40 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
20727588
Attached To
rLAMMPS lammps
pair_gpu_nbor_kernel.cu
View Options
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing authors: Mike Brown (ORNL), brownw@ornl.gov
------------------------------------------------------------------------- */
#ifdef NV_KERNEL
#include "geryon/ucl_nv_kernel.h"
#else
#define GLOBAL_ID_X get_global_id(0)
#endif
__kernel void kernel_unpack(__global int *dev_nbor, __global int *dev_ij,
const int inum) {
// ii indexes the two interacting particles in gi
int ii=GLOBAL_ID_X;
if (ii<inum) {
__global int *nbor=dev_nbor+ii+inum;
int numj=*nbor;
nbor+=inum;
__global int *list=dev_ij+*nbor;
__global int *list_end=list+numj;
for ( ; list<list_end; list++) {
*nbor=*list;
nbor+=inum;
}
} // if ii
}
Event Timeline
Log In to Comment