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 ()
 
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 ()
 
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 int * fast_imem_size_ = NULL
 
static _nrn_Fast_Imemfast_imem_
 

Macro Definition Documentation

◆ BENCHADD

#define BENCHADD (   arg)

Definition at line 85 of file multicore.cpp.

◆ BENCHBEGIN

#define BENCHBEGIN (   arg)

Definition at line 84 of file multicore.cpp.

◆ BENCHDECLARE

#define BENCHDECLARE

Definition at line 83 of file multicore.cpp.

◆ BENCHMARKING

#define BENCHMARKING   0

Definition at line 65 of file multicore.cpp.

◆ BS

#define BS   0

Definition at line 87 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 43 of file multicore.cpp.

◆ WAIT

#define WAIT   wait_for_workers

Definition at line 86 of file multicore.cpp.

Function Documentation

◆ fast_imem_alloc()

static void fast_imem_alloc ( )
static

Definition at line 603 of file multicore.cpp.

◆ fast_imem_free()

static void fast_imem_free ( )
static

Definition at line 583 of file multicore.cpp.

◆ nrn_allow_busywait()

int nrn_allow_busywait ( int  b)

Definition at line 1310 of file multicore.cpp.

◆ nrn_fast_imem_alloc()

void nrn_fast_imem_alloc ( )

Definition at line 629 of file multicore.cpp.

◆ nrn_how_many_processors()

int nrn_how_many_processors ( )

Definition at line 1349 of file multicore.cpp.

◆ nrn_malloc_lock()

void nrn_malloc_lock ( )

Definition at line 456 of file multicore.cpp.

◆ nrn_malloc_unlock()

void nrn_malloc_unlock ( )

Definition at line 457 of file multicore.cpp.

◆ nrn_mk_table_check()

void nrn_mk_table_check ( )

Definition at line 1065 of file multicore.cpp.

◆ nrn_multithread_job()

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

Definition at line 1136 of file multicore.cpp.

◆ nrn_old_thread_save()

void nrn_old_thread_save ( )

Definition at line 2159 of file treeset.cpp.

◆ nrn_onethread_job()

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

Definition at line 1166 of file multicore.cpp.

◆ nrn_thread_error()

void nrn_thread_error ( const char *  s)

Definition at line 467 of file multicore.cpp.

◆ nrn_thread_memblist_setup()

static void nrn_thread_memblist_setup ( )
static

Definition at line 901 of file multicore.cpp.

◆ nrn_thread_partition()

void nrn_thread_partition ( int  it,
Object sl 
)

Definition at line 1195 of file multicore.cpp.

◆ nrn_thread_stat()

void nrn_thread_stat ( )

Definition at line 473 of file multicore.cpp.

◆ nrn_thread_table_check()

void nrn_thread_table_check ( )

Definition at line 1106 of file multicore.cpp.

◆ nrn_threads_create()

void nrn_threads_create ( int  n,
int  parallel 
)

Definition at line 504 of file multicore.cpp.

◆ nrn_threads_free()

void nrn_threads_free ( )

Definition at line 641 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 1287 of file multicore.cpp.

◆ nrn_user_partition()

int nrn_user_partition ( )

Definition at line 1217 of file multicore.cpp.

◆ nrn_wait_for_threads()

void nrn_wait_for_threads ( )

Definition at line 1187 of file multicore.cpp.

◆ nulljob()

static void* nulljob ( NrnThread nt)
static

Definition at line 90 of file multicore.cpp.

◆ reorder_secorder()

static void reorder_secorder ( )
static

Definition at line 923 of file multicore.cpp.

◆ thread_memblist_setup()

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

Definition at line 736 of file multicore.cpp.

◆ threads_create_pthread()

static void threads_create_pthread ( )
static

Definition at line 459 of file multicore.cpp.

◆ threads_free_pthread()

static void threads_free_pthread ( )
static

Definition at line 462 of file multicore.cpp.

Variable Documentation

◆ allow_busywait_

int allow_busywait_
static

Definition at line 61 of file multicore.cpp.

◆ busywait_

int busywait_
static

Definition at line 50 of file multicore.cpp.

◆ busywait_main_

int busywait_main_
static

Definition at line 51 of file multicore.cpp.

◆ fast_imem_

_nrn_Fast_Imem* fast_imem_
static

Definition at line 581 of file multicore.cpp.

◆ fast_imem_nthread_

int fast_imem_nthread_ = 0
static

Definition at line 579 of file multicore.cpp.

◆ fast_imem_size_

int* fast_imem_size_ = NULL
static

Definition at line 580 of file multicore.cpp.

◆ nrn_inthread_

int nrn_inthread_

Definition at line 94 of file multicore.cpp.

◆ nrn_mk_transfer_thread_data_

void(* nrn_mk_transfer_thread_data_) () ( )

Definition at line 48 of file multicore.cpp.

◆ nrn_nthread

int nrn_nthread

Definition at line 46 of file multicore.cpp.

◆ nrn_thread_parallel_

int nrn_thread_parallel_
static

Definition at line 57 of file multicore.cpp.

◆ nrn_threads

NrnThread * nrn_threads

Definition at line 47 of file multicore.cpp.

◆ table_check_

Datum* table_check_
static

Definition at line 60 of file multicore.cpp.

◆ table_check_cnt_

int table_check_cnt_
static

Definition at line 59 of file multicore.cpp.