1 #ifndef __CACHEINTERFACE_H__
2 #define __CACHEINTERFACE_H__
24 CkCacheFillMsg<KeyType> *
msg;
41 void *
request(CkArrayIndexMax&, KeyType);
43 void *
unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
45 void writeback(CkArrayIndexMax&, KeyType,
void *);
52 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
78 void *
request(CkArrayIndexMax&, KeyType);
80 void *
unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
81 void writeback(CkArrayIndexMax&, KeyType,
void *);
88 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
99 void unpackSingle(CkCacheFillMsg<KeyType> *,
Tree::BinaryTreeNode *,
int, CkArrayIndexMax &,
bool);
102 void * request(CkArrayIndexMax&, KeyType);
103 void * unpack(CkCacheFillMsg<KeyType> *,
int, CkArrayIndexMax &);
104 void writeback(CkArrayIndexMax&, KeyType,
void *);
108 static void callback(CkArrayID, CkArrayIndexMax&, KeyType, CkCacheUserData &,
void*,
int);
Class for cross processor data needed for smooth operations.
Definition: GravityParticle.h:568
Cache interface to the particles for smooth calculations. This cache is a writeback cache...
Definition: CacheInterface.h:73
The data in a GravityParticle cache entry.
Definition: CacheInterface.h:21
void writeback(CkArrayIndexMax &, KeyType, void *)
Send the message back to the original TreePiece.
Definition: CacheInterface.cpp:145
KeyType key
Key of this bucket (for writeback)
Definition: CacheInterface.h:65
static void callback(CkArrayID, CkArrayIndexMax &, KeyType, CkCacheUserData &, void *, int)
callback to TreePiece after data is received.
Definition: CacheInterface.cpp:61
static void callback(CkArrayID, CkArrayIndexMax &, KeyType, CkCacheUserData &, void *, int)
callback to TreePiece after data is received.
Definition: CacheInterface.cpp:182
int end
Index of the last particle in the home processor's myParticles array.
Definition: CacheInterface.h:28
int begin
Index of the first particle in the home processor's myParticles array.
Definition: CacheInterface.h:26
Cache interface to particles for the gravity calculation. This is a read-only cache of particles...
Definition: CacheInterface.h:37
GravityParticle * partCached
particle data
Definition: CacheInterface.h:66
void * unpack(CkCacheFillMsg< KeyType > *, int, CkArrayIndexMax &)
Return data from fufilled cache request.
Definition: CacheInterface.cpp:37
void free(void *)
free cached data.
Definition: CacheInterface.cpp:45
int size(void *)
return size of cached data.
Definition: CacheInterface.cpp:176
ExternalSmoothParticle partExt[1]
particle data in the message
Definition: CacheInterface.h:68
int size(void *)
return size of cached data.
Definition: CacheInterface.cpp:49
void * request(CkArrayIndexMax &, KeyType)
Request a bucket of particles from a TreePiece.
Definition: CacheInterface.cpp:23
Information needed to calculate gravity.
Definition: GravityParticle.h:33
int end
ending Particle number
Definition: CacheInterface.h:63
int begin
Beginning particle number.
Definition: CacheInterface.h:62
void writeback(CkArrayIndexMax &, KeyType, void *)
Do nothing: this is a read-only cache.
Definition: CacheInterface.cpp:43
void * unpack(CkCacheFillMsg< KeyType > *, int, CkArrayIndexMax &)
Return data from fufilled cache request.
Definition: CacheInterface.cpp:108
Cache interface to the Tree Nodes.
Definition: CacheInterface.h:96
CkCacheFillMsg< KeyType > * msg
Message containing the data for this entry.
Definition: CacheInterface.h:24
Fundamental type for a particle.
Definition: GravityParticle.h:316
extraSPHData * extraSPHCached
particle extraData
Definition: CacheInterface.h:67
particle data in the smooth particle cache messages
Definition: CacheInterface.h:60
void * request(CkArrayIndexMax &, KeyType)
Request a bucket of particles from a TreePiece.
Definition: CacheInterface.cpp:100
A TreeNode with two children.
Definition: GenericTreeNode.h:347
int nActual
actual number of particles sent
Definition: CacheInterface.h:64
ExternalGravityParticle part[1]
Definition: CacheInterface.h:32
void free(void *)
free cached data.
Definition: CacheInterface.cpp:169