MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <stdio.h>
#include <iomanip>
#include "header.h"
#include "global.h"
#include "Dinfo.h"
#include "SparseMatrix.h"
#include "../msg/OneToOneMsg.h"
#include "../msg/SparseMsg.h"
#include "../msg/SingleMsg.h"
#include "../synapse/Synapse.h"
#include "../synapse/SynEvent.h"
#include "../synapse/SynHandlerBase.h"
#include "../synapse/SimpleSynHandler.h"
#include "../shell/Shell.h"
#include "../shell/Neutral.h"
#include "../mpi/PostMaster.h"
#include "../scheduling/Clock.h"
#include "../builtins/Arith.h"
#include "../biophysics/IntFire.h"
#include "../randnum/RNG.h"
#include <queue>
Go to the source code of this file.
Classes | |
class | Test |
class | TestId |
Functions | |
void | printGrid (Element *e, const string &field, double min, double max) |
void | printSparseMatrix (const SparseMatrix< unsigned int > &m) |
void | showFields () |
void | test2ArgSetVec () |
void | testAsync () |
void | testCinfoElements () |
void | testCinfoFields () |
void | testConvVector () |
void | testConvVectorOfVectors () |
void | testCreateMsg () |
void | testFinfoFields () |
void | testGet () |
void | testHopFunc () |
void | testIsA () |
void | testLookupSetGet () |
void | testMsgField () |
void | testMsgSrcDestFields () |
void | testSendMsg () |
void | testSendSpike () |
void | testSetGet () |
void | testSetGetDouble () |
void | testSetGetExtField () |
void | testSetGetSynapse () |
void | testSetGetVec () |
void | testSetRepeat () |
void | testSharedMsg () |
void | testSparseMatrix () |
void | testSparseMatrix2 () |
void | testSparseMatrixFill () |
void | testSparseMatrixReorder () |
void | testSparseMsg () |
void | testStrGet () |
void | testStrSet () |
Variables | |
int | _seed_ = 0 |
static SrcFinfo0 | s0 ("s0","") |
void printGrid | ( | Element * | e, |
const string & | field, | ||
double | min, | ||
double | max | ||
) |
Definition at line 763 of file testAsync.cpp.
References Field< A >::get(), Element::id(), and Element::numData().
void printSparseMatrix | ( | const SparseMatrix< unsigned int > & | m | ) |
Definition at line 485 of file testAsync.cpp.
References SparseMatrix< T >::get(), SparseMatrix< T >::getRow(), SparseMatrix< T >::nColumns(), and SparseMatrix< T >::nRows().
void showFields | ( | ) |
Definition at line 39 of file testAsync.cpp.
References Id::element(), Neutral::initCinfo(), and Id::nextId().
Referenced by testAsync().
void test2ArgSetVec | ( | ) |
Definition at line 878 of file testAsync.cpp.
References ObjId::data(), doubleEq(), Id::element(), Arith::initCinfo(), Id::nextId(), and SetGet2< A1, A2 >::setVec().
Referenced by testAsync().
void testAsync | ( | ) |
Definition at line 1813 of file testAsync.cpp.
References showFields(), test2ArgSetVec(), testCinfoElements(), testCinfoFields(), testConvVector(), testConvVectorOfVectors(), testCreateMsg(), testFinfoFields(), testHopFunc(), testIsA(), testLookupSetGet(), testMsgField(), testMsgSrcDestFields(), testSendMsg(), testSetGet(), testSetGetDouble(), testSetGetSynapse(), testSetGetVec(), testSetRepeat(), testSharedMsg(), testSparseMatrix(), testSparseMatrix2(), testSparseMatrixFill(), testSparseMatrixReorder(), testSparseMsg(), testStrGet(), and testStrSet().
Referenced by nonMpiTests().
void testCinfoElements | ( | ) |
Definition at line 1582 of file testAsync.cpp.
References Field< A >::get().
Referenced by testAsync().
void testCinfoFields | ( | ) |
Definition at line 1518 of file testAsync.cpp.
References getBaseClass(), Cinfo::getNumDestFinfo(), Cinfo::getNumLookupFinfo(), Cinfo::getNumSharedFinfo(), Cinfo::getNumSrcFinfo(), Cinfo::getNumValueFinfo(), IntFire::initCinfo(), SimpleSynHandler::initCinfo(), Neutral::initCinfo(), and neutralCinfo.
Referenced by testAsync().
void testConvVector | ( | ) |
Definition at line 1132 of file testAsync.cpp.
References Conv< T >::buf2val(), Conv< T >::size(), and Conv< T >::val2buf().
Referenced by testAsync().
void testConvVectorOfVectors | ( | ) |
Definition at line 1183 of file testAsync.cpp.
References Conv< T >::buf2val(), doubleEq(), Conv< T >::size(), and Conv< T >::val2buf().
Referenced by testAsync().
void testCreateMsg | ( | ) |
Definition at line 112 of file testAsync.cpp.
References Finfo::addMsg(), Element::data(), doubleEq(), Eref::element(), Id::element(), Id::eref(), Cinfo::findFinfo(), Arith::initCinfo(), Msg::mid(), Id::nextId(), and SrcFinfo1< T >::send().
Referenced by testAsync().
void testFinfoFields | ( | ) |
Definition at line 1457 of file testAsync.cpp.
References FinfoWrapper::dest(), FinfoWrapper::docs(), Cinfo::findFinfo(), FinfoWrapper::getName(), IntFire::initCinfo(), SimpleSynHandler::initCinfo(), Neutral::initCinfo(), name, processFinfo, FinfoWrapper::src(), and FinfoWrapper::type().
Referenced by testAsync().
void testGet | ( | ) |
Definition at line 230 of file testAsync.cpp.
References Element::data(), doubleEq(), ObjId::element(), Id::element(), Field< A >::get(), Arith::initCinfo(), Id::nextId(), and Element::setName().
void testHopFunc | ( | ) |
Definition at line 1774 of file testAsync.cpp.
References TgtInfo::bindIndex(), checkHopFuncTestBuffer(), TgtInfo::dataSize(), doubleEq(), TgtInfo::headerSize, MooseTestHop, HopFunc2< A1, A2 >::op(), and HopFunc3< A1, A2, A3 >::op().
Referenced by testAsync().
void testIsA | ( | ) |
Definition at line 1444 of file testAsync.cpp.
References Arith::initCinfo(), Neutral::initCinfo(), and Cinfo::isA().
Referenced by testAsync().
void testLookupSetGet | ( | ) |
Definition at line 1397 of file testAsync.cpp.
References ObjId::data(), Id::destroy(), doubleEq(), LookupField< L, A >::get(), Arith::getArg1(), Arith::getIdentifiedArg(), Arith::getOutput(), Arith::initCinfo(), Id::nextId(), LookupField< L, A >::set(), and Arith::setIdentifiedArg().
Referenced by testAsync().
void testMsgField | ( | ) |
Definition at line 1234 of file testAsync.cpp.
References Element::addMsgAndFunc(), ObjId::data(), doubleEq(), Eref::element(), ObjId::element(), Id::element(), Id::eref(), Cinfo::findFinfo(), DestFinfo::getFid(), Element::getName(), Arith::initCinfo(), Msg::mid(), and Id::nextId().
Referenced by testAsync().
void testMsgSrcDestFields | ( | ) |
Definition at line 1627 of file testAsync.cpp.
References Id::destroy(), Id::element(), Id::eref(), Cinfo::findFinfo(), Msg::getDestFieldsOnE1(), Msg::getDestFieldsOnE2(), Element::getFieldsOfOutgoingMsg(), Element::getMsgSourceAndSender(), Element::getMsgTargetAndFunctions(), Msg::getSrcFieldsOnE1(), Msg::getSrcFieldsOnE2(), Test::initCinfo(), Msg::mid(), name, and Id::nextId().
Referenced by testAsync().
void testSendMsg | ( | ) |
Definition at line 51 of file testAsync.cpp.
References Element::addMsgAndFunc(), Element::data(), Eref::dataIndex(), dataIndex, doubleEq(), Eref::element(), Id::element(), Id::eref(), Cinfo::findFinfo(), SrcFinfo::getBindIndex(), DestFinfo::getFid(), Arith::initCinfo(), Msg::mid(), Element::msgDigest(), Id::nextId(), SrcFinfo1< T >::send(), SrcFinfo::setBindIndex(), and Msg::targets().
Referenced by testAsync().
void testSendSpike | ( | ) |
Definition at line 431 of file testAsync.cpp.
References Finfo::addMsg(), Eref::data(), ObjId::data(), doubleEq(), ProcInfo::dt, ObjId::element(), Id::element(), ObjId::eref(), Id::eref(), Cinfo::findFinfo(), Field< A >::get(), Synapse::initCinfo(), IntFire::initCinfo(), Msg::mid(), Id::nextId(), Field< A >::set(), and Id::value().
void testSetGet | ( | ) |
Definition at line 156 of file testAsync.cpp.
References ObjId::data(), doubleEq(), Id::element(), Field< A >::get(), Arith::initCinfo(), Id::nextId(), and Field< A >::set().
Referenced by testAsync().
void testSetGetDouble | ( | ) |
Definition at line 310 of file testAsync.cpp.
References ObjId::data(), doubleEq(), Id::element(), Field< A >::get(), IntFire::initCinfo(), Id::nextId(), and Field< A >::set().
Referenced by testAsync().
void testSetGetExtField | ( | ) |
Definition at line 1299 of file testAsync.cpp.
References Shell::adopt(), ObjId::data(), Id::destroy(), doubleEq(), Field< A >::get(), Arith::initCinfo(), Neutral::initCinfo(), Id::nextId(), Field< A >::set(), Field< A >::setVec(), and Id::value().
void testSetGetSynapse | ( | ) |
Definition at line 344 of file testAsync.cpp.
References Element::data(), doubleEq(), Field< A >::get(), SimpleSynHandler::initCinfo(), Id::nextId(), Element::numData(), Field< A >::setVec(), and Id::value().
Referenced by testAsync().
void testSetGetVec | ( | ) |
Definition at line 394 of file testAsync.cpp.
References Element::data(), Id::element(), SynHandlerBase::getNumSynapses(), Field< A >::getVec(), SimpleSynHandler::initCinfo(), Id::nextId(), Field< A >::setVec(), and Id::value().
Referenced by testAsync().
void testSetRepeat | ( | ) |
Definition at line 941 of file testAsync.cpp.
References doubleEq(), Field< A >::getVec(), SimpleSynHandler::initCinfo(), Id::nextId(), Field< A >::setRepeat(), Field< A >::setVec(), and Id::value().
Referenced by testAsync().
void testSharedMsg | ( | ) |
Definition at line 1042 of file testAsync.cpp.
References Finfo::addMsg(), Eref::data(), Id::destroy(), Id::element(), Id::eref(), Cinfo::findFinfo(), Test::handleS0(), Test::handleS1(), Test::handleS2(), Test::i1_, Test::i2_, Test::initCinfo(), Msg::mid(), Id::nextId(), Test::numAcks_, s0, Test::s_, SrcFinfo1< T >::send(), and SrcFinfo2< T1, T2 >::send().
Referenced by testAsync().
void testSparseMatrix | ( | ) |
Definition at line 515 of file testAsync.cpp.
References SparseMatrix< T >::getRow(), SparseMatrix< T >::nColumns(), SparseMatrix< T >::nRows(), SparseMatrix< T >::reorderColumns(), SparseMatrix< T >::set(), and SparseMatrix< T >::transpose().
Referenced by testAsync().
void testSparseMatrix2 | ( | ) |
Definition at line 591 of file testAsync.cpp.
References SparseMatrix< T >::clear(), SparseMatrix< T >::get(), init(), SparseMatrix< T >::reorderColumns(), resize(), SparseMatrix< T >::set(), SparseMatrix< T >::setSize(), and SparseMatrix< T >::transpose().
Referenced by testAsync().
void testSparseMatrixFill | ( | ) |
Definition at line 727 of file testAsync.cpp.
References SparseMatrix< T >::get(), SparseMatrix< T >::nColumns(), SparseMatrix< T >::nEntries(), SparseMatrix< T >::nRows(), and SparseMatrix< T >::tripletFill().
Referenced by testAsync().
void testSparseMatrixReorder | ( | ) |
Definition at line 665 of file testAsync.cpp.
References SparseMatrix< T >::get(), SparseMatrix< T >::nColumns(), SparseMatrix< T >::nRows(), SparseMatrix< T >::reorderColumns(), SparseMatrix< T >::set(), and SparseMatrix< T >::setSize().
Referenced by testAsync().
void testSparseMsg | ( | ) |
Definition at line 787 of file testAsync.cpp.
References Finfo::addMsg(), ProcInfo::currTime, ProcInfo::dt, Cinfo::findFinfo(), Field< A >::get(), id, Synapse::initCinfo(), IntFire::initCinfo(), SimpleSynHandler::initCinfo(), Msg::mid(), moose::mtrand(), Id::nextId(), SparseMsg::randomConnect(), moose::setGlobalSeed(), SetGet1< A >::setRepeat(), Field< A >::setVec(), and Id::value().
Referenced by testAsync().
void testStrGet | ( | ) |
Definition at line 267 of file testAsync.cpp.
References ObjId::data(), Id::element(), Arith::initCinfo(), Id::nextId(), Element::setName(), and SetGet::strGet().
Referenced by testAsync().
void testStrSet | ( | ) |
Definition at line 188 of file testAsync.cpp.
References Shell::adopt(), Id::element(), Element::getName(), Arith::initCinfo(), Id::nextId(), and SetGet::strSet().
Referenced by testAsync().
int _seed_ = 0 |
Definition at line 37 of file testAsync.cpp.
|
static |
This sets up a reciprocal shared Msg in which the incoming value gets appended onto the corresponding value of the target. Also, as soon as any of the s1 or s2 are received, the target sends out an s0 call. All this is tallied for validating the unit test.
Referenced by estT(), Test::handleS1(), Test::handleS2(), testSharedMsg(), and CylBase::voxelVolume().