CollectionMgr::CollectVectorInstance Class Reference

#include <CollectionMgr.h>

List of all members.

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.

00047 : seq(-10) { ; }


Member Function Documentation

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

Definition at line 69 of file CollectionMgr.h.

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

00071     {
00072       int size = a.size();
00073       for( int i = 0; i < size; ++i )
00074       {
00075         aid.add(a[i]);
00076 #ifdef MEM_OPT_VERSION
00077     outRank.add(oRank[i]);
00078 #endif
00079         if ( precisions & 2 ) data.add(d[i]);
00080         if ( precisions & 1 ) fdata.add(d[i]);
00081       }
00082       return ( ! --remaining );
00083     }

void CollectionMgr::CollectVectorInstance::free (  )  [inline]

Definition at line 49 of file CollectionMgr.h.

References seq.

Referenced by CollectionMgr::submitPositions(), and CollectionMgr::submitVelocities().

00049 { seq = -10; }

int CollectionMgr::CollectVectorInstance::notfree (  )  [inline]

Definition at line 50 of file CollectionMgr.h.

References seq.

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

00050 { 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< Elem >::resize(), and seq.

00052                              {
00053       if ( s == -10 ) NAMD_bug("seq == free in CollectionMgr");
00054       seq = s;
00055       precisions = p;
00056       remaining = PatchMap::Object()->numHomePatches();
00057       aid.resize(0);
00058 #ifdef MEM_OPT_VERSION
00059       outRank.resize(0);
00060 #endif
00061       data.resize(0);
00062       fdata.resize(0);
00063     }


Member Data Documentation

AtomIDList CollectionMgr::CollectVectorInstance::aid

Definition at line 86 of file CollectionMgr.h.

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

ResizeArray<Vector> CollectionMgr::CollectVectorInstance::data

Definition at line 92 of file CollectionMgr.h.

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

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

Definition at line 85 of file CollectionMgr.h.

Referenced by free(), notfree(), reset(), CollectionMgr::CollectVectorSequence::submitData(), CollectionMgr::submitPositions(), and CollectionMgr::submitVelocities().


The documentation for this class was generated from the following file:
Generated on Sat Sep 23 01:17:17 2017 for NAMD by  doxygen 1.4.7