Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91053492
pair_gpu_atom_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
Thu, Nov 7, 09:12
Size
1 KB
Mime Type
text/x-c
Expires
Sat, Nov 9, 09:12 (2 d)
Engine
blob
Format
Raw Data
Handle
21785614
Attached To
rLAMMPS lammps
pair_gpu_atom_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
#pragma OPENCL EXTENSION cl_khr_fp64: enable
#define GLOBAL_ID_X get_global_id(0)
#endif
#ifdef _DOUBLE_DOUBLE
#define numtyp double
#define numtyp4 double4
#else
#define numtyp float
#define numtyp4 float4
#endif
__kernel void kernel_cast_x(__global numtyp4 *x_type, __global double *x,
__global int *type, const int nall) {
int ii=GLOBAL_ID_X;
if (ii<nall) {
numtyp4 xt;
xt.w=type[ii];
int i=ii*3;
xt.x=x[i];
xt.y=x[i+1];
xt.z=x[i+2];
x_type[ii]=xt;
} // if ii
}
Event Timeline
Log In to Comment