NAMD
Public Member Functions | Public Attributes | List of all members
CollectionMgr::CollectVectorInstance Class Reference

#include <CollectionMgr.h>

Public Member Functions

 CollectVectorInstance (void)
 
void free ()
 
int notfree ()
 
void reset (int s, int p)
 
int append (AtomIDList &a, ResizeArray< Vector > &d)
 

Public Attributes

int seq
 
AtomIDList aid
 
int precisions
 
ResizeArray< Vectordata
 
ResizeArray< FloatVectorfdata
 

Detailed Description

Definition at line 43 of file CollectionMgr.h.

Constructor & Destructor Documentation

CollectionMgr::CollectVectorInstance::CollectVectorInstance ( void  )
inline

Definition at line 47 of file CollectionMgr.h.

Member Function Documentation

int CollectionMgr::CollectVectorInstance::append ( AtomIDList a,
ResizeArray< Vector > &  d 
)
inline

Definition at line 69 of file CollectionMgr.h.

References ResizeArray< T >::add(), aid, data, fdata, precisions, and ResizeArray< T >::size().

71  {
72  int size = a.size();
73  for( int i = 0; i < size; ++i )
74  {
75  aid.add(a[i]);
76 #ifdef MEM_OPT_VERSION
77  outRank.add(oRank[i]);
78 #endif
79  if ( precisions & 2 ) data.add(d[i]);
80  if ( precisions & 1 ) fdata.add(d[i]);
81  }
82  return ( ! --remaining );
83  }
int add(const Elem &elem)
Definition: ResizeArray.h:97
ResizeArray< FloatVector > fdata
Definition: CollectionMgr.h:93
int size(void) const
Definition: ResizeArray.h:127
void CollectionMgr::CollectVectorInstance::free ( )
inline
int CollectionMgr::CollectVectorInstance::notfree ( )
inline

Definition at line 50 of file CollectionMgr.h.

References seq.

Referenced by CollectionMgr::CollectVectorSequence::submitData().

50 { return ( seq != -10 ); }
void CollectionMgr::CollectVectorInstance::reset ( int  s,
int  p 
)
inline

Definition at line 52 of file CollectionMgr.h.

References aid, data, fdata, NAMD_bug(), PatchMap::numHomePatches(), PatchMap::Object(), precisions, ResizeArray< T >::resize(), and seq.

52  {
53  if ( s == -10 ) NAMD_bug("seq == free in CollectionMgr");
54  seq = s;
55  precisions = p;
56  remaining = PatchMap::Object()->numHomePatches();
57  aid.resize(0);
58 #ifdef MEM_OPT_VERSION
59  outRank.resize(0);
60 #endif
61  data.resize(0);
62  fdata.resize(0);
63  }
static PatchMap * Object()
Definition: PatchMap.h:27
void NAMD_bug(const char *err_msg)
Definition: common.C:129
void resize(int i)
Definition: ResizeArray.h:84
int numHomePatches(void)
Definition: PatchMap.C:432
ResizeArray< FloatVector > fdata
Definition: CollectionMgr.h:93

Member Data Documentation

AtomIDList CollectionMgr::CollectVectorInstance::aid
ResizeArray<Vector> CollectionMgr::CollectVectorInstance::data
ResizeArray<FloatVector> CollectionMgr::CollectVectorInstance::fdata

Definition at line 93 of file CollectionMgr.h.

Referenced by append(), reset(), and CollectionMgr::submitPositions().

int CollectionMgr::CollectVectorInstance::precisions

Definition at line 91 of file CollectionMgr.h.

Referenced by append(), and reset().

int CollectionMgr::CollectVectorInstance::seq

The documentation for this class was generated from the following file: