MTMCSim
0.5
|
Koetter-Vardy decoding simulation for channel coding. More...
#include <KVChanSim.h>
Classes | |
class | KVChanCompRes |
The computed results from input parameters. More... | |
class | KVChanPara |
The parameters for the simulation. More... | |
class | KVChanSimuRes |
The simulation results. More... | |
class | ThreadWorkSpace |
Work space for each thread. More... | |
class | XNSeq |
A random number object for this problem is one source sequence and one channel noise sequence (standard normal). More... | |
Public Member Functions | |
KVChanSim (KVChanPara ¶_, TextSaveUI &resFile_, TextSaveUI &tempFile_, DispUI &dispUI_) | |
void | prepare (const MCThreadInfo &) |
This function will be called by the scheduler before the threads are created. More... | |
void | oneThread (shared_ptr< RNObj >, const MCThreadInfo &) |
The work to be done by a worker thread. More... | |
shared_ptr< RNObj > | genRNObj () |
Returns the random number object, usually they are random sequences. More... | |
void | dumpOneResult (const MCThreadInfo &) |
Put the result from one thread to the final result object. More... | |
void | setCompResMap (compResMap &compResM_) const |
Calls compRes.setMapping(compResM_);. More... | |
void | postProcess () |
This function will be called after the RNG thread and worker threads are done. More... | |
virtual bool | checkTerm () |
Return true if the terminate condition satisfies. More... | |
Public Member Functions inherited from MTMCSim::MultiRunSimuBase | |
MultiRunSimuBase (int mode_, SimuPara &simupara) | |
virtual | ~MultiRunSimuBase () |
Public Member Functions inherited from MTMCSim::MTMCSimBase | |
void | singleThreadSim () |
Single thread simulation. More... | |
virtual | ~MTMCSimBase () |
Virtual Destructor. More... | |
Public Member Functions inherited from MTMCSim::MultiRunnable | |
virtual shared_ptr< SimuPara > | getNextPara () |
Get the parameter for the next simulation. More... | |
virtual bool | quit () const |
Check if terminate the whole simulation series. More... | |
MultiRunnable () | |
Default constructor. More... | |
MultiRunnable (int mode_, SimuPara &simupara) | |
virtual | ~MultiRunnable () |
Additional Inherited Members | |
Protected Attributes inherited from MTMCSim::MultiRunnable | |
int | mulMode |
bool | isQuit |
shared_ptr< SimuPara > | nextPara |
Koetter-Vardy decoding simulation for channel coding.
The simulation is for channel coding scenario.
MTMCSim::KVChanSim::KVChanSim | ( | KVChanPara & | para_, |
TextSaveUI & | resFile_, | ||
TextSaveUI & | tempFile_, | ||
DispUI & | dispUI_ | ||
) |
|
virtual |
Return true if the terminate condition satisfies.
Thread safty is partially guaranteed by the scheduler. The result object will be locked but only the result object will be locked. So, typically it only reads the parameter object (which is always safe) and reads the result object (because the result object is locked by the scheduler)
Implements MTMCSim::MTMCSimBase.
|
virtual |
Put the result from one thread to the final result object.
It itself does not need to consider thread safty because a mutex will be locked before it is called.
Implements MTMCSim::MTMCSimBase.
|
virtual |
Returns the random number object, usually they are random sequences.
Each object is for one thread. The object is created by "new" inside the function and can be accessed througth the renturned shared_ptr.
Implements MTMCSim::MTMCSimBase.
|
virtual |
The work to be done by a worker thread.
This function should be written in a thread-safe manner, i.e., no conflict. no critical section. This typically can be done by creating workspace for each thread, either as an automatic variable in the function, or as a data member in the simulator class.
Implements MTMCSim::MTMCSimBase.
|
virtual |
This function will be called after the RNG thread and worker threads are done.
Reimplemented from MTMCSim::MTMCSimBase.
|
virtual |
This function will be called by the scheduler before the threads are created.
\ Typically do resource allocation here.
Reimplemented from MTMCSim::MTMCSimBase.
|
virtual |
Calls compRes.setMapping(compResM_);.
Implements MTMCSim::MTMCSimBase.