NEURON
multicore.h File Reference
#include "membfunc.h"
#include <cstddef>

Go to the source code of this file.

Classes

struct  NrnThreadMembList
 
struct  NrnThreadBAList
 
class  NrnThread
 Represent main neuron object computed by single thread. More...
 

Typedefs

typedef struct NrnThreadMembList NrnThreadMembList
 
typedef struct NrnThreadBAList NrnThreadBAList
 
using hoc_List = hoc_Item
 
using worker_job_t = void *(*)(NrnThread *)
 
using worker_job_with_token_t = void(*)(neuron::model_sorted_token const &, NrnThread &)
 

Functions

int nrn_allow_busywait (int b)
 
int nrn_how_many_processors ()
 
void nrn_threads_create (int n, bool parallel)
 
void nrn_thread_error (const char *)
 
void nrn_multithread_job (worker_job_t)
 
void nrn_multithread_job (neuron::model_sorted_token const &, worker_job_with_token_t)
 
void nrn_onethread_job (int, void *(*)(NrnThread *))
 
void nrn_wait_for_threads ()
 
Object ** nrn_get_thread_partition (int it)
 
void nrn_thread_partition (int it, Object *sl)
 
void nrn_thread_table_check (neuron::model_sorted_token const &)
 
void nrn_threads_free ()
 
int nrn_user_partition ()
 
void reorder_secorder ()
 
void nrn_thread_memblist_setup ()
 
std::size_t nof_worker_threads ()
 
auto for_threads (NrnThread *threads, int num_threads)
 

Variables

int nrn_nthread
 
NrnThreadnrn_threads
 

Typedef Documentation

◆ hoc_List

using hoc_List = hoc_Item

Definition at line 46 of file multicore.h.

◆ NrnThreadBAList

◆ NrnThreadMembList

◆ worker_job_t

using worker_job_t = void* (*) (NrnThread*)

Definition at line 116 of file multicore.h.

◆ worker_job_with_token_t

Definition at line 117 of file multicore.h.

Function Documentation

◆ for_threads()

auto for_threads ( NrnThread threads,
int  num_threads 
)
inline

Definition at line 133 of file multicore.h.

◆ nof_worker_threads()

std::size_t nof_worker_threads ( )

Definition at line 1048 of file multicore.cpp.

◆ nrn_allow_busywait()

int nrn_allow_busywait ( int  b)

Definition at line 1032 of file multicore.cpp.

◆ nrn_get_thread_partition()

Object** nrn_get_thread_partition ( int  it)

Definition at line 921 of file multicore.cpp.

◆ nrn_how_many_processors()

int nrn_how_many_processors ( )

Definition at line 1038 of file multicore.cpp.

◆ nrn_multithread_job() [1/2]

void nrn_multithread_job ( neuron::model_sorted_token const &  cache_token,
worker_job_with_token_t  job 
)

Definition at line 855 of file multicore.cpp.

◆ nrn_multithread_job() [2/2]

void nrn_multithread_job ( worker_job_t  job)

Definition at line 836 of file multicore.cpp.

◆ nrn_onethread_job()

void nrn_onethread_job ( int  ,
void *  *)(NrnThread * 
)

◆ nrn_thread_error()

void nrn_thread_error ( const char *  s)

Definition at line 297 of file multicore.cpp.

◆ nrn_thread_memblist_setup()

void nrn_thread_memblist_setup ( )

Definition at line 629 of file multicore.cpp.

◆ nrn_thread_partition()

void nrn_thread_partition ( int  it,
Object sl 
)

Definition at line 899 of file multicore.cpp.

◆ nrn_thread_table_check()

void nrn_thread_table_check ( neuron::model_sorted_token const &  sorted_token)

Definition at line 807 of file multicore.cpp.

◆ nrn_threads_create()

void nrn_threads_create ( int  n,
bool  parallel 
)

Definition at line 303 of file multicore.cpp.

◆ nrn_threads_free()

void nrn_threads_free ( )

Definition at line 386 of file multicore.cpp.

◆ nrn_user_partition()

int nrn_user_partition ( )

Definition at line 940 of file multicore.cpp.

◆ nrn_wait_for_threads()

void nrn_wait_for_threads ( )

Definition at line 891 of file multicore.cpp.

◆ reorder_secorder()

void reorder_secorder ( )

Definition at line 661 of file multicore.cpp.

Variable Documentation

◆ nrn_nthread

int nrn_nthread
extern

Definition at line 57 of file multicore.cpp.

◆ nrn_threads

NrnThread* nrn_threads
extern

Definition at line 58 of file multicore.cpp.