#include <mblock_impl.h>
Public Member Functions | |
MBlockChunk (const CkArrayID &threads) | |
MBlockChunk (CkMigrateMessage *msg) | |
~MBlockChunk () | |
void | read (const char *prefix, int nDim) |
void | ckJustMigrated (void) |
void | recv (MBlockDataMsg *) |
void | reductionResult (CkReductionMsg *) |
int | add_field (field_t *f) |
void | start_update (int fid, const extrudeMethod &m, void *ingrid, void *outgrid) |
int | test_update (void) |
int | wait_update (void) |
void | reduce_field (int fid, const void *nodes, void *outbuf, int op) |
void | reduce (int fid, const void *inbuf, void *outbuf, int op) |
void | print (void) |
int | register_bc (const int bcnum, const MBLK_BcFn bcfn, const extrudeMethod &m, bool isFortran) |
void | apply_single_bc (patch *p, void *p1, void *p2) |
int | apply_bc (const int bcnum, void *p1, void *p2) |
int | apply_bc_all (void *p1, void *p2) |
void | pup (PUP::er &p) |
Static Public Member Functions | |
static void | copy (const blockLoc &src, int *dest, int shift=0) |
Data Fields | |
block * | b |
Private Member Functions | |
void | commonInit (void) |
void | migInit (void) |
void | send (int fid, const extrudeMethod &m, const void *grid) |
void | update_field (MBlockDataMsg *m) |
Private Attributes | |
int | nfields |
field_t * | fields [MBLK_MAXDT] |
int | nudata |
void * | userdata [MBLK_MAXUDATA] |
MBLK_PupFn | pup_ud [MBLK_MAXUDATA] |
CProxy_TCharm | threads |
TCharm * | thread |
bc_t | bcs [MBLK_MAXBC] |
CmmTable | messages |
int | seqnum |
update_t | update |
int | nRecvPatches |
void * | reduce_output |
Data Structures | |
class | bc_t |
class | update_t |
Definition at line 97 of file mblock_impl.h.
MBlockChunk::MBlockChunk | ( | const CkArrayID & | threads | ) |
Definition at line 191 of file mblock.C.
References CmmNew(), commonInit(), messages, migInit(), MBlockChunk::update_t::nRecd, TCharm::semaPut(), thread, threads, update, and MBlockChunk::update_t::wait_seqnum.
MBlockChunk::MBlockChunk | ( | CkMigrateMessage * | msg | ) |
Definition at line 205 of file mblock.C.
References commonInit(), and messages.
MBlockChunk::~MBlockChunk | ( | ) |
void MBlockChunk::commonInit | ( | void | ) | [private] |
void MBlockChunk::migInit | ( | void | ) | [private] |
Definition at line 214 of file mblock.C.
References TCharm::getThread(), thread, and threads.
Referenced by ckJustMigrated(), and MBlockChunk().
void MBlockChunk::read | ( | const char * | prefix, | |
int | nDim | |||
) |
Definition at line 234 of file mblock.C.
References b, block::getPatch(), block::getPatches(), patch::internal, n, nRecvPatches, p, and patch::type.
Referenced by MBLK_Read().
void MBlockChunk::ckJustMigrated | ( | void | ) |
Definition at line 221 of file mblock.C.
References ArrayElement::ckJustMigrated(), and migInit().
void MBlockChunk::recv | ( | MBlockDataMsg * | dm | ) |
Definition at line 249 of file mblock.C.
References CmmPut(), messages, MBlockChunk::update_t::nRecd, nRecvPatches, TCharm::resume(), seqnum, MBlockDataMsg::seqnum, thread, update, update_field(), and MBlockChunk::update_t::wait_seqnum.
void MBlockChunk::reductionResult | ( | CkReductionMsg * | m | ) |
Definition at line 457 of file mblock.C.
References CkReductionMsg::getData(), CkReductionMsg::getSize(), reduce_output, TCharm::resume(), and thread.
Definition at line 149 of file mblock_impl.h.
References fields, and nfields.
Referenced by MBLK_Create_field().
void MBlockChunk::start_update | ( | int | fid, | |
const extrudeMethod & | m, | |||
void * | ingrid, | |||
void * | outgrid | |||
) |
Definition at line 354 of file mblock.C.
References MBlockChunk::update_t::m, messages, MBlockChunk::update_t::nRecd, nRecvPatches, MBlockChunk::update_t::ogrid, send(), seqnum, update, update_field(), and MBlockChunk::update_t::wait_seqnum.
Referenced by MBLK_Iupdate_field().
int MBlockChunk::test_update | ( | void | ) |
Definition at line 381 of file mblock.C.
References update, and MBlockChunk::update_t::wait_seqnum.
Referenced by MBLK_Test_update().
int MBlockChunk::wait_update | ( | void | ) |
Definition at line 387 of file mblock.C.
References nRecvPatches, seqnum, TCharm::suspend(), thread, update, and MBlockChunk::update_t::wait_seqnum.
Referenced by MBLK_Wait_update().
Definition at line 398 of file mblock.C.
References blockDim::c_index(), combine(), PUP::d, field_t::dim, DType::distance, field_t::dt, fields, DType::init_offset, MBLK_Get_blocksize(), reduce(), src, and DType::vec_len.
Referenced by MBLK_Reduce_field().
Definition at line 418 of file mblock.C.
References DType::base_type, field_t::dt, fields, DType::length(), CkReduction::max_double, CkReduction::max_float, CkReduction::max_int, CkReduction::min_double, CkReduction::min_float, CkReduction::min_int, reduce_output, rtype, CkReduction::sum_double, CkReduction::sum_float, CkReduction::sum_int, TCharm::suspend(), and thread.
Referenced by MBLK_Reduce(), and reduce_field().
void MBlockChunk::print | ( | void | ) |
Definition at line 802 of file mblock.C.
Referenced by MBLK_Print_block().
int MBlockChunk::register_bc | ( | const int | bcnum, | |
const MBLK_BcFn | bcfn, | |||
const extrudeMethod & | m, | |||
bool | isFortran | |||
) | [inline] |
Definition at line 163 of file mblock_impl.h.
References bcs, MBlockChunk::bc_t::fn, MBlockChunk::bc_t::isFortran, and MBlockChunk::bc_t::m.
Referenced by FTN_NAME(), and MBLK_Register_bc().
void MBlockChunk::apply_single_bc | ( | patch * | p, | |
void * | p1, | |||
void * | p2 | |||
) | [inline] |
Definition at line 175 of file mblock_impl.h.
References TCharm::activateThread(), bcs, TCharm::deactivateThread(), blockSpan::end, MBlockChunk::bc_t::fn, patch::getExtents(), blockSpan::getInt3(), PUP::m, PUP::s, and blockSpan::start.
Referenced by apply_bc(), and apply_bc_all().
Definition at line 189 of file mblock_impl.h.
References apply_single_bc(), b, bcs, patch::ext, block::getPatch(), block::getPatches(), n, p, and patch::type.
Referenced by MBLK_Apply_bc().
int MBlockChunk::apply_bc_all | ( | void * | p1, | |
void * | p2 | |||
) | [inline] |
Definition at line 204 of file mblock_impl.h.
References apply_single_bc(), b, patch::ext, block::getPatch(), block::getPatches(), n, p, and patch::type.
Referenced by MBLK_Apply_bc_all().
Definition at line 216 of file mblock_impl.h.
void MBlockChunk::pup | ( | PUP::er & | p | ) |
Definition at line 815 of file mblock.C.
References bcs, cmm_pup_mblock_message(), CmmPup(), fields, PUP::er::isUnpacking(), messages, nfields, MBlockChunk::update_t::nRecd, nRecvPatches, p, field_t::pup(), seqnum, threads, update, and MBlockChunk::update_t::wait_seqnum.
void MBlockChunk::send | ( | int | fid, | |
const extrudeMethod & | m, | |||
const void * | grid | |||
) | [private] |
Definition at line 267 of file mblock.C.
References b, blockSpan::contains(), PUP::d, MBlockDataMsg::data, data, internalBCpatch::dest, dest, orientation::destAxis(), internalBCpatch::destPatch, field_t::dim, orientation::dIsFlipped(), DType::distance, field_t::dt, blockSpan::end, fields, blockSpan::getDim(), patch::getExtents(), block::getPatch(), block::getPatches(), blockDim::getSize(), DType::init_offset, patch::internal, DType::length(), PUP::m, msg, n, internalBCpatch::orient, p, seqnum, src, blockSpan::start, and patch::type.
Referenced by start_update().
void MBlockChunk::update_field | ( | MBlockDataMsg * | m | ) | [private] |
Definition at line 323 of file mblock.C.
References field_t::arrayBytes, b, blockDim::c_index(), MBlockDataMsg::data, data, dest, field_t::dim, DType::distance, field_t::dt, blockSpan::end, MBlockDataMsg::fid, fields, field_t::forVoxel, patch::getExtents(), block::getPatch(), DType::init_offset, DType::length(), length, MBlockChunk::update_t::m, MBlockChunk::update_t::nRecd, MBlockChunk::update_t::ogrid, p, MBlockDataMsg::patchno, MBlockDataMsg::seqnum, blockSpan::start, and update.
Referenced by recv(), and start_update().
int MBlockChunk::nfields [private] |
field_t* MBlockChunk::fields[MBLK_MAXDT] [private] |
Definition at line 101 of file mblock_impl.h.
Referenced by add_field(), pup(), reduce(), reduce_field(), send(), and update_field().
int MBlockChunk::nudata [private] |
Definition at line 103 of file mblock_impl.h.
void* MBlockChunk::userdata[MBLK_MAXUDATA] [private] |
Definition at line 104 of file mblock_impl.h.
MBLK_PupFn MBlockChunk::pup_ud[MBLK_MAXUDATA] [private] |
Definition at line 105 of file mblock_impl.h.
CProxy_TCharm MBlockChunk::threads [private] |
TCharm* MBlockChunk::thread [private] |
Definition at line 108 of file mblock_impl.h.
Referenced by MBlockChunk(), migInit(), recv(), reduce(), reductionResult(), and wait_update().
bc_t MBlockChunk::bcs[MBLK_MAXBC] [private] |
Definition at line 116 of file mblock_impl.h.
Referenced by apply_bc(), apply_single_bc(), commonInit(), pup(), and register_bc().
CmmTable MBlockChunk::messages [private] |
Definition at line 118 of file mblock_impl.h.
Referenced by MBlockChunk(), pup(), recv(), start_update(), and ~MBlockChunk().
int MBlockChunk::seqnum [private] |
Definition at line 119 of file mblock_impl.h.
Referenced by commonInit(), pup(), recv(), send(), start_update(), and wait_update().
update_t MBlockChunk::update [private] |
Definition at line 127 of file mblock_impl.h.
Referenced by MBlockChunk(), pup(), recv(), start_update(), test_update(), update_field(), and wait_update().
int MBlockChunk::nRecvPatches [private] |
Definition at line 128 of file mblock_impl.h.
Referenced by pup(), read(), recv(), start_update(), and wait_update().
void* MBlockChunk::reduce_output [private] |
Definition at line 135 of file mblock_impl.h.
Referenced by apply_bc(), apply_bc_all(), commonInit(), MBLK_Get_blocksize(), MBLK_Get_nodelocs(), read(), send(), update_field(), and ~MBlockChunk().