NAMD
Public Member Functions | Public Attributes | List of all members
cr_sortop_distance Struct Reference

Public Member Functions

 cr_sortop_distance (const Lattice &lattice)
 
bool operator() (ComputeNonbondedCUDA::compute_record i, ComputeNonbondedCUDA::compute_record j)
 
 cr_sortop_distance (const Lattice &lattice)
 
bool operator() (CudaComputeNonbonded::ComputeRecord i, CudaComputeNonbonded::ComputeRecord j)
 

Public Attributes

const Latticel
 

Detailed Description

Definition at line 1045 of file ComputeNonbondedCUDA.C.

Constructor & Destructor Documentation

cr_sortop_distance::cr_sortop_distance ( const Lattice lattice)
inline

Definition at line 1047 of file ComputeNonbondedCUDA.C.

1047 : l(lattice) { }
cr_sortop_distance::cr_sortop_distance ( const Lattice lattice)
inline

Definition at line 1545 of file CudaComputeNonbonded.C.

1545 : l(lattice) { }

Member Function Documentation

bool cr_sortop_distance::operator() ( ComputeNonbondedCUDA::compute_record  i,
ComputeNonbondedCUDA::compute_record  j 
)
inline

Definition at line 1048 of file ComputeNonbondedCUDA.C.

References Lattice::a(), Lattice::b(), Lattice::c(), l, ComputeNonbondedCUDA::compute_record::offset, Vector::x, Vector::y, and Vector::z.

1049  {
1050  Vector a = l.a();
1051  Vector b = l.b();
1052  Vector c = l.c();
1053  BigReal ri = (i.offset.x * a + i.offset.y * b + i.offset.z * c).length2();
1054  BigReal rj = (j.offset.x * a + j.offset.y * b + j.offset.z * c).length2();
1055  return ( ri < rj );
1056  }
Definition: Vector.h:64
BigReal z
Definition: Vector.h:66
BigReal x
Definition: Vector.h:66
BigReal y
Definition: Vector.h:66
Vector b() const
Definition: Lattice.h:253
Vector a() const
Definition: Lattice.h:252
Vector c() const
Definition: Lattice.h:254
double BigReal
Definition: common.h:112
bool cr_sortop_distance::operator() ( CudaComputeNonbonded::ComputeRecord  i,
CudaComputeNonbonded::ComputeRecord  j 
)
inline

Definition at line 1546 of file CudaComputeNonbonded.C.

References Lattice::a(), Lattice::b(), Lattice::c(), l, CudaComputeNonbonded::ComputeRecord::offset, Vector::x, Vector::y, and Vector::z.

1547  {
1548  Vector a = l.a();
1549  Vector b = l.b();
1550  Vector c = l.c();
1551  BigReal ri = (i.offset.x * a + i.offset.y * b + i.offset.z * c).length2();
1552  BigReal rj = (j.offset.x * a + j.offset.y * b + j.offset.z * c).length2();
1553  return ( ri < rj );
1554  }
Definition: Vector.h:64
BigReal z
Definition: Vector.h:66
BigReal x
Definition: Vector.h:66
BigReal y
Definition: Vector.h:66
Vector b() const
Definition: Lattice.h:253
Vector a() const
Definition: Lattice.h:252
Vector c() const
Definition: Lattice.h:254
double BigReal
Definition: common.h:112

Member Data Documentation

const Lattice & cr_sortop_distance::l

Definition at line 1046 of file ComputeNonbondedCUDA.C.

Referenced by operator()().


The documentation for this struct was generated from the following files: