NEURON
multicore.cpp File Reference
#include <nrnpthread.h>
#include <nrnmpi.h>

Go to the source code of this file.

Macros

#define CACHELINE_ALLOC(name, type, size)   name = (type*)nrn_cacheline_alloc((void**)&name, size*sizeof(type))
 
#define CACHELINE_CALLOC(name, type, size)   name = (type*)nrn_cacheline_calloc((void**)&name, size, sizeof(type))
 
#define BENCHMARKING   0
 
#define BENCHDECLARE
 
#define BENCHBEGIN(arg)
 
#define BENCHADD(arg)
 
#define WAIT   wait_for_workers
 
#define BS   0
 

Functions

void nrn_thread_error (const char *)
 
void nrn_threads_free ()
 
void nrn_old_thread_save ()
 
double nrn_timeus ()
 
void nrn_mk_table_check ()
 
static voidnulljob (NrnThread *nt)
 
void nrn_malloc_lock ()
 
void nrn_malloc_unlock ()
 
static void threads_create_pthread ()
 
static void threads_free_pthread ()
 
void nrn_thread_stat ()
 
void nrn_threads_create (int n, int parallel)
 
static void fast_imem_free ()
 
static void fast_imem_alloc ()
 
void nrn_fast_imem_alloc ()
 
static void thread_memblist_setup (NrnThread *_nt, int *mlcnt, void **vmap)
 
static void nrn_thread_memblist_setup ()
 
static void reorder_secorder ()
 
 FOR_THREADS (_nt)
 
 ForAllSections (sec) sec -> order=-1
 
 assert (order==section_count)
 
 if (nrn_multisplit_setup_)
 
void nrn_thread_table_check ()
 
void nrn_hoc_lock ()
 
void nrn_hoc_unlock ()
 
void nrn_multithread_job (void *(*job)(NrnThread *))
 
void nrn_onethread_job (int i, void *(*job)(NrnThread *))
 
void nrn_wait_for_threads ()
 
void nrn_thread_partition (int it, Object *sl)
 
int nrn_user_partition ()
 
 for (it=0;it< nrn_nthread;++it)
 
 if (n !=nrn_global_ncell)
 
void nrn_use_busywait (int b)
 
int nrn_allow_busywait (int b)
 
int nrn_how_many_processors ()
 

Variables

int nrn_nthread
 
NrnThreadnrn_threads
 
void(* nrn_mk_transfer_thread_data_ )()
 
static int busywait_
 
static int busywait_main_
 
static int nrn_thread_parallel_
 
static int table_check_cnt_
 
static Datumtable_check_
 
static int allow_busywait_
 
int nrn_inthread_
 
static int fast_imem_nthread_ = 0
 
static intfast_imem_size_ = NULL
 
static _nrn_Fast_Imemfast_imem_
 
 order = 0
 
inode< _nt-> end
 
 inode
 
 n = 0
 
 return
 

Macro Definition Documentation

◆ BENCHADD

#define BENCHADD (   arg)

Definition at line 79 of file multicore.cpp.

◆ BENCHBEGIN

#define BENCHBEGIN (   arg)

Definition at line 78 of file multicore.cpp.

◆ BENCHDECLARE

#define BENCHDECLARE

Definition at line 77 of file multicore.cpp.

◆ BENCHMARKING

#define BENCHMARKING   0

Definition at line 63 of file multicore.cpp.

◆ BS

#define BS   0

Definition at line 81 of file multicore.cpp.

◆ CACHELINE_ALLOC

#define CACHELINE_ALLOC (   name,
  type,
  size 
)    name = (type*)nrn_cacheline_alloc((void**)&name, size*sizeof(type))

Definition at line 41 of file multicore.cpp.

◆ CACHELINE_CALLOC

#define CACHELINE_CALLOC (   name,
  type,
  size 
)    name = (type*)nrn_cacheline_calloc((void**)&name, size, sizeof(type))

Definition at line 42 of file multicore.cpp.

◆ WAIT

#define WAIT   wait_for_workers

Definition at line 80 of file multicore.cpp.

Function Documentation

◆ assert()

assert ( order  = =section_count)

◆ fast_imem_alloc()

static void fast_imem_alloc ( )
static

Definition at line 588 of file multicore.cpp.

◆ fast_imem_free()

static void fast_imem_free ( )
static

Definition at line 568 of file multicore.cpp.

◆ for()

for ( )

Definition at line 1198 of file multicore.cpp.

◆ FOR_THREADS()

FOR_THREADS ( _nt  )

Definition at line 887 of file multicore.cpp.

◆ ForAllSections()

ForAllSections ( sec  ) -> order=-1

Definition at line 555 of file extcelln.cpp.

◆ if() [1/2]

Definition at line 988 of file multicore.cpp.

◆ if() [2/2]

if ( n = nrn_global_ncell)

Definition at line 1217 of file multicore.cpp.

◆ nrn_allow_busywait()

int nrn_allow_busywait ( int  b)

Definition at line 1247 of file multicore.cpp.

◆ nrn_fast_imem_alloc()

void nrn_fast_imem_alloc ( )

Definition at line 614 of file multicore.cpp.

◆ nrn_how_many_processors()

int nrn_how_many_processors ( )

Definition at line 1286 of file multicore.cpp.

◆ nrn_malloc_lock()

void nrn_malloc_lock ( )

Definition at line 442 of file multicore.cpp.

◆ nrn_malloc_unlock()

void nrn_malloc_unlock ( )

Definition at line 443 of file multicore.cpp.

◆ nrn_mk_table_check()

void nrn_mk_table_check ( )

Definition at line 1009 of file multicore.cpp.

◆ nrn_multithread_job()

void nrn_multithread_job ( void *(*)(NrnThread *)  job)

Definition at line 1081 of file multicore.cpp.

◆ nrn_old_thread_save()

void nrn_old_thread_save ( )

Definition at line 2140 of file treeset.cpp.

◆ nrn_onethread_job()

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

Definition at line 1111 of file multicore.cpp.

◆ nrn_thread_error()

void nrn_thread_error ( const char *  s)

Definition at line 453 of file multicore.cpp.

◆ nrn_thread_memblist_setup()

static void nrn_thread_memblist_setup ( )
static

Definition at line 855 of file multicore.cpp.

◆ nrn_thread_partition()

void nrn_thread_partition ( int  it,
Object sl 
)

Definition at line 1140 of file multicore.cpp.

◆ nrn_thread_stat()

void nrn_thread_stat ( )

Definition at line 459 of file multicore.cpp.

◆ nrn_thread_table_check()

void nrn_thread_table_check ( )

Definition at line 1050 of file multicore.cpp.

◆ nrn_threads_create()

void nrn_threads_create ( int  n,
int  parallel 
)

Definition at line 490 of file multicore.cpp.

◆ nrn_threads_free()

void nrn_threads_free ( )

Definition at line 626 of file multicore.cpp.

◆ nrn_timeus()

double nrn_timeus ( )

Definition at line 61 of file ftime.cpp.

◆ nrn_use_busywait()

void nrn_use_busywait ( int  b)

Definition at line 1224 of file multicore.cpp.

◆ nrn_user_partition()

int nrn_user_partition ( )

Definition at line 1162 of file multicore.cpp.

◆ nrn_wait_for_threads()

void nrn_wait_for_threads ( )

Definition at line 1132 of file multicore.cpp.

◆ nulljob()

static void* nulljob ( NrnThread nt)
static

Definition at line 84 of file multicore.cpp.

◆ reorder_secorder()

static void reorder_secorder ( )
static

Definition at line 875 of file multicore.cpp.

◆ thread_memblist_setup()

static void thread_memblist_setup ( NrnThread _nt,
int mlcnt,
void **  vmap 
)
static

Definition at line 697 of file multicore.cpp.

◆ threads_create_pthread()

static void threads_create_pthread ( )
static

Definition at line 445 of file multicore.cpp.

◆ threads_free_pthread()

static void threads_free_pthread ( )
static

Definition at line 448 of file multicore.cpp.

Variable Documentation

◆ allow_busywait_

int allow_busywait_
static

Definition at line 59 of file multicore.cpp.

◆ busywait_

int busywait_
static

Definition at line 48 of file multicore.cpp.

◆ busywait_main_

int busywait_main_
static

Definition at line 49 of file multicore.cpp.

◆ end

inode< _nt-> end

Definition at line 985 of file multicore.cpp.

◆ fast_imem_

_nrn_Fast_Imem* fast_imem_
static

Definition at line 566 of file multicore.cpp.

◆ fast_imem_nthread_

int fast_imem_nthread_ = 0
static

Definition at line 564 of file multicore.cpp.

◆ fast_imem_size_

int* fast_imem_size_ = NULL
static

Definition at line 565 of file multicore.cpp.

◆ inode

inode
Initial value:
{
_nt->_v_node[inode]->_classical_parent = _nt->_v_parent[inode]
inode
Definition: multicore.cpp:985

Definition at line 985 of file multicore.cpp.

◆ n

n = 0

Definition at line 1197 of file multicore.cpp.

◆ nrn_inthread_

int nrn_inthread_

Definition at line 88 of file multicore.cpp.

◆ nrn_mk_transfer_thread_data_

void(* nrn_mk_transfer_thread_data_) ()

Definition at line 46 of file multicore.cpp.

◆ nrn_nthread

int nrn_nthread

Definition at line 44 of file multicore.cpp.

◆ nrn_thread_parallel_

int nrn_thread_parallel_
static

Definition at line 55 of file multicore.cpp.

◆ nrn_threads

NrnThread * nrn_threads

Definition at line 45 of file multicore.cpp.

◆ order

order = 0

Definition at line 886 of file multicore.cpp.

◆ return

return

Definition at line 1221 of file multicore.cpp.

◆ table_check_

Datum* table_check_
static

Definition at line 58 of file multicore.cpp.

◆ table_check_cnt_

int table_check_cnt_
static

Definition at line 57 of file multicore.cpp.