NEURON
nvector_nrnthread.cpp File Reference
#include <stdio.h>
#include <stdlib.h>
#include "shared/nvector_serial.h"
#include "nvector_nrnthread.h"
#include "shared/sundialsmath.h"
#include "shared/sundialstypes.h"
#include "section.h"
#include "nrnmutdec.h"

Go to the source code of this file.

Macros

#define USELONGDOUBLE   0
 
#define ZERO   RCONST(0.0)
 
#define HALF   RCONST(0.5)
 
#define ONE   RCONST(1.0)
 
#define ONEPT5   RCONST(1.5)
 
#define mydebug(a)
 
#define mydebug2(a, b)
 
#define ldrealtype   realtype
 
#define xpass   x_ = x;
 
#define ypass   y_ = y;
 
#define zpass   z_ = z;
 
#define wpass   w_ = w;
 
#define idpass   id_ = id;
 
#define apass   a_ = a;
 
#define bpass   b_ = b;
 
#define cpass   c_ = c;
 
#define xarg(i)   NV_SUBVEC_NT(x_, i)
 
#define yarg(i)   NV_SUBVEC_NT(y_, i)
 
#define zarg(i)   NV_SUBVEC_NT(z_, i)
 
#define warg(i)   NV_SUBVEC_NT(w_, i)
 
#define idarg(i)   NV_SUBVEC_NT(id_, i)
 
#define aarg   a_
 
#define barg   b_
 
#define carg   c_
 
#define lock   MUTLOCK
 
#define unlock   MUTUNLOCK
 
#define lockadd(arg)
 
#define locklongdadd(arg)   lockadd(arg)
 
#define lockmax(arg)
 
#define lockmin(arg)
 
#define lockfalse
 

Functions

N_Vector N_VNewEmpty_NrnThread (long int length, int nthread, long int *sizes)
 
N_Vector N_VNew_NrnThread (long int length, int nthread, long int *sizes)
 
N_Vector N_VCloneEmpty_NrnThread (N_Vector w)
 
N_Vector N_VMake_NrnThread (long int length, realtype *v_data)
 
N_Vector * N_VNewVectorArray_NrnThread (int count, long int length, int nthread, long int *sizes)
 
N_Vector * N_VNewVectorArrayEmpty_NrnThread (int count, long int length, int nthread, long int *sizes)
 
void N_VDestroyVectorArray_NrnThread (N_Vector *vs, int count)
 
void N_VPrint_NrnThread (N_Vector x)
 
static void pr (N_Vector x)
 
N_Vector N_VClone_NrnThread (N_Vector w)
 
void N_VDestroy_NrnThread (N_Vector v)
 
void N_VSpace_NrnThread (N_Vector v, long int *lrw, long int *liw)
 
realtype * N_VGetArrayPointer_NrnThread (N_Vector v)
 
void N_VSetArrayPointer_NrnThread (realtype *v_data, N_Vector v)
 
static voidvlinearsum (NrnThread *nt)
 
void N_VLinearSum_NrnThread (realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z)
 
static voidvconst (NrnThread *nt)
 
void N_VConst_NrnThread (realtype c, N_Vector z)
 
static voidvprod (NrnThread *nt)
 
void N_VProd_NrnThread (N_Vector x, N_Vector y, N_Vector z)
 
static voidvdiv (NrnThread *nt)
 
void N_VDiv_NrnThread (N_Vector x, N_Vector y, N_Vector z)
 
static voidvscale (NrnThread *nt)
 
void N_VScale_NrnThread (realtype c, N_Vector x, N_Vector z)
 
static voidvabs (NrnThread *nt)
 
void N_VAbs_NrnThread (N_Vector x, N_Vector z)
 
static voidvinv (NrnThread *nt)
 
void N_VInv_NrnThread (N_Vector x, N_Vector z)
 
static voidvaddconst (NrnThread *nt)
 
void N_VAddConst_NrnThread (N_Vector x, realtype b, N_Vector z)
 
static voidvdotprod (NrnThread *nt)
 
realtype N_VDotProd_NrnThread (N_Vector x, N_Vector y)
 
static voidvmaxnorm (NrnThread *nt)
 
realtype N_VMaxNorm_NrnThread (N_Vector x)
 
static ldrealtype vwrmsnorm_help (N_Vector x, N_Vector w)
 
static voidvwrmsnorm (NrnThread *nt)
 
realtype N_VWrmsNorm_NrnThread (N_Vector x, N_Vector w)
 
static realtype vwrmsnormmask_help (N_Vector x, N_Vector w, N_Vector id)
 
static voidvwrmsnormmask (NrnThread *nt)
 
realtype N_VWrmsNormMask_NrnThread (N_Vector x, N_Vector w, N_Vector id)
 
static voidvmin (NrnThread *nt)
 
realtype N_VMin_NrnThread (N_Vector x)
 
static realtype N_VWL2Norm_helper (N_Vector x, N_Vector w)
 
static voidvwl2norm (NrnThread *nt)
 
realtype N_VWL2Norm_NrnThread (N_Vector x, N_Vector w)
 
static voidvl1norm (NrnThread *nt)
 
realtype N_VL1Norm_NrnThread (N_Vector x)
 
static voidv1mask (NrnThread *nt)
 
void N_VOneMask_NrnThread (N_Vector x)
 
static voidvcompare (NrnThread *nt)
 
void N_VCompare_NrnThread (realtype c, N_Vector x, N_Vector z)
 
static voidvinvtest (NrnThread *nt)
 
booleantype N_VInvTest_NrnThread (N_Vector x, N_Vector z)
 
static voidvconstrmask (NrnThread *nt)
 
booleantype N_VConstrMask_NrnThread (N_Vector y, N_Vector x, N_Vector z)
 
static voidvminquotient (NrnThread *nt)
 
realtype N_VMinQuotient_NrnThread (N_Vector x, N_Vector y)
 

Variables

static N_Vector x_
 
static N_Vector y_
 
static N_Vector z_
 
static N_Vector w_
 
static N_Vector id_
 
static realtype a_
 
static realtype b_
 
static realtype c_
 
static realtype retval
 
static booleantype bretval
 

Macro Definition Documentation

◆ aarg

#define aarg   a_

Definition at line 80 of file nvector_nrnthread.cpp.

◆ apass

#define apass   a_ = a;

Definition at line 72 of file nvector_nrnthread.cpp.

◆ barg

#define barg   b_

Definition at line 81 of file nvector_nrnthread.cpp.

◆ bpass

#define bpass   b_ = b;

Definition at line 73 of file nvector_nrnthread.cpp.

◆ carg

#define carg   c_

Definition at line 82 of file nvector_nrnthread.cpp.

◆ cpass

#define cpass   c_ = c;

Definition at line 74 of file nvector_nrnthread.cpp.

◆ HALF

#define HALF   RCONST(0.5)

Definition at line 32 of file nvector_nrnthread.cpp.

◆ idarg

#define idarg (   i)    NV_SUBVEC_NT(id_, i)

Definition at line 79 of file nvector_nrnthread.cpp.

◆ idpass

#define idpass   id_ = id;

Definition at line 71 of file nvector_nrnthread.cpp.

◆ ldrealtype

#define ldrealtype   realtype

Definition at line 47 of file nvector_nrnthread.cpp.

◆ lock

#define lock   MUTLOCK

Definition at line 83 of file nvector_nrnthread.cpp.

◆ lockadd

#define lockadd (   arg)
Value:
lock; \
retval += arg; \
unlock;
#define lock
#define arg
Definition: redef.h:28

Definition at line 85 of file nvector_nrnthread.cpp.

◆ lockfalse

#define lockfalse
Value:
lock; \
bretval = FALSE; \
unlock;
#define FALSE
Definition: err.c:56

Definition at line 109 of file nvector_nrnthread.cpp.

◆ locklongdadd

#define locklongdadd (   arg)    lockadd(arg)

Definition at line 95 of file nvector_nrnthread.cpp.

◆ lockmax

#define lockmax (   arg)
Value:
lock; \
if (retval < arg) { \
retval = arg; \
}; \
unlock;
static realtype retval

Definition at line 97 of file nvector_nrnthread.cpp.

◆ lockmin

#define lockmin (   arg)
Value:
lock; \
if (retval > arg) { \
retval = arg; \
}; \
unlock;

Definition at line 103 of file nvector_nrnthread.cpp.

◆ mydebug

#define mydebug (   a)

Definition at line 40 of file nvector_nrnthread.cpp.

◆ mydebug2

#define mydebug2 (   a,
 
)

Definition at line 41 of file nvector_nrnthread.cpp.

◆ ONE

#define ONE   RCONST(1.0)

Definition at line 33 of file nvector_nrnthread.cpp.

◆ ONEPT5

#define ONEPT5   RCONST(1.5)

Definition at line 34 of file nvector_nrnthread.cpp.

◆ unlock

#define unlock   MUTUNLOCK

Definition at line 84 of file nvector_nrnthread.cpp.

◆ USELONGDOUBLE

#define USELONGDOUBLE   0

Definition at line 19 of file nvector_nrnthread.cpp.

◆ warg

#define warg (   i)    NV_SUBVEC_NT(w_, i)

Definition at line 78 of file nvector_nrnthread.cpp.

◆ wpass

#define wpass   w_ = w;

Definition at line 70 of file nvector_nrnthread.cpp.

◆ xarg

#define xarg (   i)    NV_SUBVEC_NT(x_, i)

Definition at line 75 of file nvector_nrnthread.cpp.

◆ xpass

#define xpass   x_ = x;

Definition at line 67 of file nvector_nrnthread.cpp.

◆ yarg

#define yarg (   i)    NV_SUBVEC_NT(y_, i)

Definition at line 76 of file nvector_nrnthread.cpp.

◆ ypass

#define ypass   y_ = y;

Definition at line 68 of file nvector_nrnthread.cpp.

◆ zarg

#define zarg (   i)    NV_SUBVEC_NT(z_, i)

Definition at line 77 of file nvector_nrnthread.cpp.

◆ ZERO

#define ZERO   RCONST(0.0)

Definition at line 31 of file nvector_nrnthread.cpp.

◆ zpass

#define zpass   z_ = z;

Definition at line 69 of file nvector_nrnthread.cpp.

Function Documentation

◆ N_VAbs_NrnThread()

void N_VAbs_NrnThread ( N_Vector  x,
N_Vector  z 
)

Definition at line 558 of file nvector_nrnthread.cpp.

◆ N_VAddConst_NrnThread()

void N_VAddConst_NrnThread ( N_Vector  x,
realtype  b,
N_Vector  z 
)

Definition at line 578 of file nvector_nrnthread.cpp.

◆ N_VClone_NrnThread()

N_Vector N_VClone_NrnThread ( N_Vector  w)

Definition at line 426 of file nvector_nrnthread.cpp.

◆ N_VCloneEmpty_NrnThread()

N_Vector N_VCloneEmpty_NrnThread ( N_Vector  w)

Definition at line 234 of file nvector_nrnthread.cpp.

◆ N_VCompare_NrnThread()

void N_VCompare_NrnThread ( realtype  c,
N_Vector  x,
N_Vector  z 
)

Definition at line 760 of file nvector_nrnthread.cpp.

◆ N_VConst_NrnThread()

void N_VConst_NrnThread ( realtype  c,
N_Vector  z 
)

Definition at line 517 of file nvector_nrnthread.cpp.

◆ N_VConstrMask_NrnThread()

booleantype N_VConstrMask_NrnThread ( N_Vector  y,
N_Vector  x,
N_Vector  z 
)

Definition at line 790 of file nvector_nrnthread.cpp.

◆ N_VDestroy_NrnThread()

void N_VDestroy_NrnThread ( N_Vector  v)

Definition at line 458 of file nvector_nrnthread.cpp.

◆ N_VDestroyVectorArray_NrnThread()

void N_VDestroyVectorArray_NrnThread ( N_Vector *  vs,
int  count 
)

Definition at line 392 of file nvector_nrnthread.cpp.

◆ N_VDiv_NrnThread()

void N_VDiv_NrnThread ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

Definition at line 537 of file nvector_nrnthread.cpp.

◆ N_VDotProd_NrnThread()

realtype N_VDotProd_NrnThread ( N_Vector  x,
N_Vector  y 
)

Definition at line 590 of file nvector_nrnthread.cpp.

◆ N_VGetArrayPointer_NrnThread()

realtype* N_VGetArrayPointer_NrnThread ( N_Vector  v)

Definition at line 487 of file nvector_nrnthread.cpp.

◆ N_VInv_NrnThread()

void N_VInv_NrnThread ( N_Vector  x,
N_Vector  z 
)

Definition at line 568 of file nvector_nrnthread.cpp.

◆ N_VInvTest_NrnThread()

booleantype N_VInvTest_NrnThread ( N_Vector  x,
N_Vector  z 
)

Definition at line 774 of file nvector_nrnthread.cpp.

◆ N_VL1Norm_NrnThread()

realtype N_VL1Norm_NrnThread ( N_Vector  x)

Definition at line 739 of file nvector_nrnthread.cpp.

◆ N_VLinearSum_NrnThread()

void N_VLinearSum_NrnThread ( realtype  a,
N_Vector  x,
realtype  b,
N_Vector  y,
N_Vector  z 
)

Definition at line 506 of file nvector_nrnthread.cpp.

◆ N_VMake_NrnThread()

N_Vector N_VMake_NrnThread ( long int  length,
realtype *  v_data 
)

Definition at line 315 of file nvector_nrnthread.cpp.

◆ N_VMaxNorm_NrnThread()

realtype N_VMaxNorm_NrnThread ( N_Vector  x)

Definition at line 604 of file nvector_nrnthread.cpp.

◆ N_VMin_NrnThread()

realtype N_VMin_NrnThread ( N_Vector  x)

Definition at line 694 of file nvector_nrnthread.cpp.

◆ N_VMinQuotient_NrnThread()

realtype N_VMinQuotient_NrnThread ( N_Vector  x,
N_Vector  y 
)

Definition at line 804 of file nvector_nrnthread.cpp.

◆ N_VNew_NrnThread()

N_Vector N_VNew_NrnThread ( long int  length,
int  nthread,
long int *  sizes 
)

Definition at line 203 of file nvector_nrnthread.cpp.

◆ N_VNewEmpty_NrnThread()

N_Vector N_VNewEmpty_NrnThread ( long int  length,
int  nthread,
long int *  sizes 
)

Definition at line 124 of file nvector_nrnthread.cpp.

◆ N_VNewVectorArray_NrnThread()

N_Vector* N_VNewVectorArray_NrnThread ( int  count,
long int  length,
int  nthread,
long int *  sizes 
)

Definition at line 337 of file nvector_nrnthread.cpp.

◆ N_VNewVectorArrayEmpty_NrnThread()

N_Vector* N_VNewVectorArrayEmpty_NrnThread ( int  count,
long int  length,
int  nthread,
long int *  sizes 
)

Definition at line 363 of file nvector_nrnthread.cpp.

◆ N_VOneMask_NrnThread()

void N_VOneMask_NrnThread ( N_Vector  x)

Definition at line 751 of file nvector_nrnthread.cpp.

◆ N_VPrint_NrnThread()

void N_VPrint_NrnThread ( N_Vector  x)

Definition at line 405 of file nvector_nrnthread.cpp.

◆ N_VProd_NrnThread()

void N_VProd_NrnThread ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)

Definition at line 527 of file nvector_nrnthread.cpp.

◆ N_VScale_NrnThread()

void N_VScale_NrnThread ( realtype  c,
N_Vector  x,
N_Vector  z 
)

Definition at line 547 of file nvector_nrnthread.cpp.

◆ N_VSetArrayPointer_NrnThread()

void N_VSetArrayPointer_NrnThread ( realtype *  v_data,
N_Vector  v 
)

Definition at line 494 of file nvector_nrnthread.cpp.

◆ N_VSpace_NrnThread()

void N_VSpace_NrnThread ( N_Vector  v,
long int *  lrw,
long int *  liw 
)

Definition at line 478 of file nvector_nrnthread.cpp.

◆ N_VWL2Norm_helper()

static realtype N_VWL2Norm_helper ( N_Vector  x,
N_Vector  w 
)
static

Definition at line 701 of file nvector_nrnthread.cpp.

◆ N_VWL2Norm_NrnThread()

realtype N_VWL2Norm_NrnThread ( N_Vector  x,
N_Vector  w 
)

Definition at line 723 of file nvector_nrnthread.cpp.

◆ N_VWrmsNorm_NrnThread()

realtype N_VWrmsNorm_NrnThread ( N_Vector  x,
N_Vector  w 
)

Definition at line 635 of file nvector_nrnthread.cpp.

◆ N_VWrmsNormMask_NrnThread()

realtype N_VWrmsNormMask_NrnThread ( N_Vector  x,
N_Vector  w,
N_Vector  id 
)

Definition at line 676 of file nvector_nrnthread.cpp.

◆ pr()

static void pr ( N_Vector  x)
static

Definition at line 417 of file nvector_nrnthread.cpp.

◆ v1mask()

static void* v1mask ( NrnThread nt)
static

Definition at line 746 of file nvector_nrnthread.cpp.

◆ vabs()

static void* vabs ( NrnThread nt)
static

Definition at line 553 of file nvector_nrnthread.cpp.

◆ vaddconst()

static void* vaddconst ( NrnThread nt)
static

Definition at line 573 of file nvector_nrnthread.cpp.

◆ vcompare()

static void* vcompare ( NrnThread nt)
static

Definition at line 755 of file nvector_nrnthread.cpp.

◆ vconst()

static void* vconst ( NrnThread nt)
static

Definition at line 512 of file nvector_nrnthread.cpp.

◆ vconstrmask()

static void* vconstrmask ( NrnThread nt)
static

Definition at line 781 of file nvector_nrnthread.cpp.

◆ vdiv()

static void* vdiv ( NrnThread nt)
static

Definition at line 532 of file nvector_nrnthread.cpp.

◆ vdotprod()

static void* vdotprod ( NrnThread nt)
static

Definition at line 583 of file nvector_nrnthread.cpp.

◆ vinv()

static void* vinv ( NrnThread nt)
static

Definition at line 563 of file nvector_nrnthread.cpp.

◆ vinvtest()

static void* vinvtest ( NrnThread nt)
static

Definition at line 765 of file nvector_nrnthread.cpp.

◆ vl1norm()

static void* vl1norm ( NrnThread nt)
static

Definition at line 732 of file nvector_nrnthread.cpp.

◆ vlinearsum()

static void* vlinearsum ( NrnThread nt)
static

Definition at line 501 of file nvector_nrnthread.cpp.

◆ vmaxnorm()

static void* vmaxnorm ( NrnThread nt)
static

Definition at line 597 of file nvector_nrnthread.cpp.

◆ vmin()

static void* vmin ( NrnThread nt)
static

Definition at line 685 of file nvector_nrnthread.cpp.

◆ vminquotient()

static void* vminquotient ( NrnThread nt)
static

Definition at line 797 of file nvector_nrnthread.cpp.

◆ vprod()

static void* vprod ( NrnThread nt)
static

Definition at line 522 of file nvector_nrnthread.cpp.

◆ vscale()

static void* vscale ( NrnThread nt)
static

Definition at line 542 of file nvector_nrnthread.cpp.

◆ vwl2norm()

static void* vwl2norm ( NrnThread nt)
static

Definition at line 716 of file nvector_nrnthread.cpp.

◆ vwrmsnorm()

static void* vwrmsnorm ( NrnThread nt)
static

Definition at line 628 of file nvector_nrnthread.cpp.

◆ vwrmsnorm_help()

static ldrealtype vwrmsnorm_help ( N_Vector  x,
N_Vector  w 
)
static

Definition at line 612 of file nvector_nrnthread.cpp.

◆ vwrmsnormmask()

static void* vwrmsnormmask ( NrnThread nt)
static

Definition at line 669 of file nvector_nrnthread.cpp.

◆ vwrmsnormmask_help()

static realtype vwrmsnormmask_help ( N_Vector  x,
N_Vector  w,
N_Vector  id 
)
static

Definition at line 651 of file nvector_nrnthread.cpp.

Variable Documentation

◆ a_

realtype a_
static

Definition at line 59 of file nvector_nrnthread.cpp.

◆ b_

realtype b_
static

Definition at line 60 of file nvector_nrnthread.cpp.

◆ bretval

booleantype bretval
static

Definition at line 66 of file nvector_nrnthread.cpp.

◆ c_

realtype c_
static

Definition at line 61 of file nvector_nrnthread.cpp.

◆ id_

N_Vector id_
static

Definition at line 58 of file nvector_nrnthread.cpp.

◆ retval

realtype retval
static

Definition at line 62 of file nvector_nrnthread.cpp.

◆ w_

N_Vector w_
static

Definition at line 57 of file nvector_nrnthread.cpp.

◆ x_

N_Vector x_
static

Definition at line 54 of file nvector_nrnthread.cpp.

◆ y_

N_Vector y_
static

Definition at line 55 of file nvector_nrnthread.cpp.

◆ z_

N_Vector z_
static

Definition at line 56 of file nvector_nrnthread.cpp.