00001 00007 #ifndef COMPUTENONBONDEDCUDAEXCL_INL 00008 #define COMPUTENONBONDEDCUDAEXCL_INL 00009 00010 #include "ComputeNonbondedCUDAExcl.h" 00011 00012 inline ExclElem::ExclElem() { ; } 00013 00014 inline ExclElem::ExclElem(AtomID atom0, const TupleSignature *sig, const int *v){ 00015 atomID[0] = atom0; 00016 atomID[1] = atom0 + sig->offset[0]; 00017 modified = sig->tupleParamType; 00018 } 00019 00020 inline ExclElem::ExclElem(const Exclusion *a, const int *v) 00021 { 00022 atomID[0] = a->atom1; 00023 atomID[1] = a->atom2; 00024 modified = a->modified; 00025 } 00026 00027 inline ExclElem::ExclElem(AtomID atom0, AtomID atom1) 00028 { 00029 if (atom0 > atom1) { // Swap end atoms so lowest is first! 00030 AtomID tmp = atom1; atom1 = atom0; atom0 = tmp; 00031 } 00032 atomID[0] = atom0; 00033 atomID[1] = atom1; 00034 } 00035 00036 inline int ExclElem::operator==(const ExclElem &a) const 00037 { 00038 return (a.atomID[0] == atomID[0] && a.atomID[1] == atomID[1]); 00039 } 00040 00041 inline int ExclElem::operator<(const ExclElem &a) const 00042 { 00043 return (atomID[0] < a.atomID[0] || 00044 (atomID[0] == a.atomID[0] && 00045 (atomID[1] < a.atomID[1]) )); 00046 } 00047 00048 #endif 00049
1.3.9.1