CoreNEURON
coreneuron::CheckPoints Class Reference

Detailed Description

Definition at line 17 of file nrn_checkpoint.hpp.

#include <nrn_checkpoint.hpp>

Public Member Functions

 CheckPoints (const std::string &save, const std::string &restore)
 
std::string get_save_path () const
 
std::string get_restore_path () const
 
bool should_save () const
 
bool should_restore () const
 
double restore_time () const
 todo : need to broadcast this rather than all reading a double More...
 
void write_checkpoint (NrnThread *nt, int nb_threads) const
 
bool initialize ()
 
void restore_tqueue (NrnThread &, const Phase2 &p2)
 

Private Member Functions

void write_time () const
 
void write_phase2 (NrnThread &nt) const
 
template<typename T >
void data_write (FileHandler &F, T *data, int cnt, int sz, int layout, int *permute) const
 
template<typename T >
T * soa2aos (T *data, int cnt, int sz, int layout, int *permute) const
 
void write_tqueue (TQItem *q, NrnThread &nt, FileHandler &fh) const
 
void write_tqueue (NrnThread &nt, FileHandler &fh) const
 
void restore_tqitem (int type, std::shared_ptr< Phase2::EventTypeBase > event, NrnThread &nt)
 

Private Attributes

const std::string save_
 
const std::string restore_
 
bool restored
 
int patstim_index
 
double patstim_te
 

Constructor & Destructor Documentation

◆ CheckPoints()

coreneuron::CheckPoints::CheckPoints ( const std::string &  save,
const std::string &  restore 
)

Definition at line 34 of file nrn_checkpoint.cpp.

Member Function Documentation

◆ data_write()

template<typename T >
void coreneuron::CheckPoints::data_write ( FileHandler F,
T *  data,
int  cnt,
int  sz,
int  layout,
int *  permute 
) const
private

Definition at line 644 of file nrn_checkpoint.cpp.

◆ get_restore_path()

std::string coreneuron::CheckPoints::get_restore_path ( ) const
inline

Definition at line 23 of file nrn_checkpoint.hpp.

◆ get_save_path()

std::string coreneuron::CheckPoints::get_save_path ( ) const
inline

Definition at line 20 of file nrn_checkpoint.hpp.

◆ initialize()

bool coreneuron::CheckPoints::initialize ( )

Definition at line 575 of file nrn_checkpoint.cpp.

◆ restore_time()

double coreneuron::CheckPoints::restore_time ( ) const

todo : need to broadcast this rather than all reading a double

Definition at line 46 of file nrn_checkpoint.cpp.

◆ restore_tqitem()

void coreneuron::CheckPoints::restore_tqitem ( int  type,
std::shared_ptr< Phase2::EventTypeBase event,
NrnThread nt 
)
private

Definition at line 726 of file nrn_checkpoint.cpp.

◆ restore_tqueue()

void coreneuron::CheckPoints::restore_tqueue ( NrnThread nt,
const Phase2 p2 
)

Definition at line 857 of file nrn_checkpoint.cpp.

◆ should_restore()

bool coreneuron::CheckPoints::should_restore ( ) const
inline

Definition at line 29 of file nrn_checkpoint.hpp.

◆ should_save()

bool coreneuron::CheckPoints::should_save ( ) const
inline

Definition at line 26 of file nrn_checkpoint.hpp.

◆ soa2aos()

template<typename T >
T * coreneuron::CheckPoints::soa2aos ( T *  data,
int  cnt,
int  sz,
int  layout,
int *  permute 
) const
private

Definition at line 619 of file nrn_checkpoint.cpp.

◆ write_checkpoint()

void coreneuron::CheckPoints::write_checkpoint ( NrnThread nt,
int  nb_threads 
) const

if openmp threading needed: #pragma omp parallel for private(i) shared(nt, nb_threads) schedule(runtime)

Definition at line 60 of file nrn_checkpoint.cpp.

◆ write_phase2()

void coreneuron::CheckPoints::write_phase2 ( NrnThread nt) const
private

Definition at line 118 of file nrn_checkpoint.cpp.

◆ write_time()

void coreneuron::CheckPoints::write_time ( ) const
private

Definition at line 560 of file nrn_checkpoint.cpp.

◆ write_tqueue() [1/2]

void coreneuron::CheckPoints::write_tqueue ( NrnThread nt,
FileHandler fh 
) const
private

Definition at line 783 of file nrn_checkpoint.cpp.

◆ write_tqueue() [2/2]

void coreneuron::CheckPoints::write_tqueue ( TQItem q,
NrnThread nt,
FileHandler fh 
) const
private

Definition at line 655 of file nrn_checkpoint.cpp.

Member Data Documentation

◆ patstim_index

int coreneuron::CheckPoints::patstim_index
private

Definition at line 44 of file nrn_checkpoint.hpp.

◆ patstim_te

double coreneuron::CheckPoints::patstim_te
private

Definition at line 45 of file nrn_checkpoint.hpp.

◆ restore_

const std::string coreneuron::CheckPoints::restore_
private

Definition at line 42 of file nrn_checkpoint.hpp.

◆ restored

bool coreneuron::CheckPoints::restored
private

Definition at line 43 of file nrn_checkpoint.hpp.

◆ save_

const std::string coreneuron::CheckPoints::save_
private

Definition at line 41 of file nrn_checkpoint.hpp.


The documentation for this class was generated from the following files: