NEURON
nvector_nrnparallel_ld.cpp File Reference
#include <../../nrnconf.h>
#include <hocassrt.h>
#include <stdio.h>
#include <stdlib.h>
#include <nrnmpiuse.h>
#include "nvector_nrnparallel_ld.h"
#include "sundialsmath.h"
#include "sundialstypes.h"

Go to the source code of this file.

Macros

#define USELONGDOUBLE   1
 
#define ZERO   RCONST(0.0)
 
#define HALF   RCONST(0.5)
 
#define ONE   RCONST(1.0)
 
#define ONEPT5   RCONST(1.5)
 
#define ldrealtype   long double
 
#define BAD_N1   "N_VNew_NrnParallelLD -- Sum of local vector lengths differs from "
 
#define BAD_N2   "input global length. \n\n"
 
#define BAD_N   BAD_N1 BAD_N2
 

Functions

static realtype VAllReduce_NrnParallelLD (realtype d, int op, MPI_Comm comm)
 
static ldrealtype VAllReduce_long_NrnParallelLD (ldrealtype d, int op, MPI_Comm comm)
 
static void VCopy_NrnParallelLD (N_Vector x, N_Vector z)
 
static void VSum_NrnParallelLD (N_Vector x, N_Vector y, N_Vector z)
 
static void VDiff_NrnParallelLD (N_Vector x, N_Vector y, N_Vector z)
 
static void VNeg_NrnParallelLD (N_Vector x, N_Vector z)
 
static void VScaleSum_NrnParallelLD (realtype c, N_Vector x, N_Vector y, N_Vector z)
 
static void VScaleDiff_NrnParallelLD (realtype c, N_Vector x, N_Vector y, N_Vector z)
 
static void VLin1_NrnParallelLD (realtype a, N_Vector x, N_Vector y, N_Vector z)
 
static void VLin2_NrnParallelLD (realtype a, N_Vector x, N_Vector y, N_Vector z)
 
static void Vaxpy_NrnParallelLD (realtype a, N_Vector x, N_Vector y)
 
static void VScaleBy_NrnParallelLD (realtype a, N_Vector x)
 
N_Vector N_VNewEmpty_NrnParallelLD (MPI_Comm comm, long int local_length, long int global_length)
 
N_Vector N_VNew_NrnParallelLD (MPI_Comm comm, long int local_length, long int global_length)
 
N_Vector N_VCloneEmpty_NrnParallelLD (N_Vector w)
 
N_Vector N_VMake_NrnParallelLD (MPI_Comm comm, long int local_length, long int global_length, realtype *v_data)
 
N_Vector * N_VNewVectorArray_NrnParallelLD (int count, MPI_Comm comm, long int local_length, long int global_length)
 
N_Vector * N_VNewVectorArrayEmpty_NrnParallelLD (int count, MPI_Comm comm, long int local_length, long int global_length)
 
void N_VDestroyVectorArray_NrnParallelLD (N_Vector *vs, int count)
 
void N_VPrint_NrnParallelLD (N_Vector x)
 
N_Vector N_VClone_NrnParallelLD (N_Vector w)
 
void N_VDestroy_NrnParallelLD (N_Vector v)
 
void N_VSpace_NrnParallelLD (N_Vector v, long int *lrw, long int *liw)
 
realtype * N_VGetArrayPointer_NrnParallelLD (N_Vector v)
 
void N_VSetArrayPointer_NrnParallelLD (realtype *v_data, N_Vector v)
 
void N_VLinearSum_NrnParallelLD (realtype a, N_Vector x, realtype b, N_Vector y, N_Vector z)
 
void N_VConst_NrnParallelLD (realtype c, N_Vector z)
 
void N_VProd_NrnParallelLD (N_Vector x, N_Vector y, N_Vector z)
 
void N_VDiv_NrnParallelLD (N_Vector x, N_Vector y, N_Vector z)
 
void N_VScale_NrnParallelLD (realtype c, N_Vector x, N_Vector z)
 
void N_VAbs_NrnParallelLD (N_Vector x, N_Vector z)
 
void N_VInv_NrnParallelLD (N_Vector x, N_Vector z)
 
void N_VAddConst_NrnParallelLD (N_Vector x, realtype b, N_Vector z)
 
realtype N_VDotProd_NrnParallelLD (N_Vector x, N_Vector y)
 
realtype N_VMaxNorm_NrnParallelLD (N_Vector x)
 
realtype N_VWrmsNorm_NrnParallelLD (N_Vector x, N_Vector w)
 
realtype N_VWrmsNormMask_NrnParallelLD (N_Vector x, N_Vector w, N_Vector id)
 
realtype N_VMin_NrnParallelLD (N_Vector x)
 
realtype N_VWL2Norm_NrnParallelLD (N_Vector x, N_Vector w)
 
realtype N_VL1Norm_NrnParallelLD (N_Vector x)
 
void N_VCompare_NrnParallelLD (realtype c, N_Vector x, N_Vector z)
 
booleantype N_VInvTest_NrnParallelLD (N_Vector x, N_Vector z)
 
booleantype N_VConstrMask_NrnParallelLD (N_Vector c, N_Vector x, N_Vector m)
 
realtype N_VMinQuotient_NrnParallelLD (N_Vector num, N_Vector denom)
 

Variables

MPI_Comm nrnmpi_comm
 

Macro Definition Documentation

◆ BAD_N

#define BAD_N   BAD_N1 BAD_N2

Definition at line 63 of file nvector_nrnparallel_ld.cpp.

◆ BAD_N1

#define BAD_N1   "N_VNew_NrnParallelLD -- Sum of local vector lengths differs from "

Definition at line 61 of file nvector_nrnparallel_ld.cpp.

◆ BAD_N2

#define BAD_N2   "input global length. \n\n"

Definition at line 62 of file nvector_nrnparallel_ld.cpp.

◆ HALF

#define HALF   RCONST(0.5)

Definition at line 48 of file nvector_nrnparallel_ld.cpp.

◆ ldrealtype

#define ldrealtype   long double

Definition at line 53 of file nvector_nrnparallel_ld.cpp.

◆ ONE

#define ONE   RCONST(1.0)

Definition at line 49 of file nvector_nrnparallel_ld.cpp.

◆ ONEPT5

#define ONEPT5   RCONST(1.5)

Definition at line 50 of file nvector_nrnparallel_ld.cpp.

◆ USELONGDOUBLE

#define USELONGDOUBLE   1

Definition at line 19 of file nvector_nrnparallel_ld.cpp.

◆ ZERO

#define ZERO   RCONST(0.0)

Definition at line 47 of file nvector_nrnparallel_ld.cpp.

Function Documentation

◆ N_VAbs_NrnParallelLD()

void N_VAbs_NrnParallelLD ( N_Vector  x,
N_Vector  z 
)

Definition at line 615 of file nvector_nrnparallel_ld.cpp.

◆ N_VAddConst_NrnParallelLD()

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

Definition at line 639 of file nvector_nrnparallel_ld.cpp.

◆ N_VClone_NrnParallelLD()

N_Vector N_VClone_NrnParallelLD ( N_Vector  w)

Definition at line 410 of file nvector_nrnparallel_ld.cpp.

◆ N_VCloneEmpty_NrnParallelLD()

N_Vector N_VCloneEmpty_NrnParallelLD ( N_Vector  w)

Definition at line 219 of file nvector_nrnparallel_ld.cpp.

◆ N_VCompare_NrnParallelLD()

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

Definition at line 796 of file nvector_nrnparallel_ld.cpp.

◆ N_VConst_NrnParallelLD()

void N_VConst_NrnParallelLD ( realtype  c,
N_Vector  z 
)

Definition at line 556 of file nvector_nrnparallel_ld.cpp.

◆ N_VConstrMask_NrnParallelLD()

booleantype N_VConstrMask_NrnParallelLD ( N_Vector  c,
N_Vector  x,
N_Vector  m 
)

Definition at line 834 of file nvector_nrnparallel_ld.cpp.

◆ N_VDestroy_NrnParallelLD()

void N_VDestroy_NrnParallelLD ( N_Vector  v)

Definition at line 438 of file nvector_nrnparallel_ld.cpp.

◆ N_VDestroyVectorArray_NrnParallelLD()

void N_VDestroyVectorArray_NrnParallelLD ( N_Vector *  vs,
int  count 
)

Definition at line 372 of file nvector_nrnparallel_ld.cpp.

◆ N_VDiv_NrnParallelLD()

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

Definition at line 580 of file nvector_nrnparallel_ld.cpp.

◆ N_VDotProd_NrnParallelLD()

realtype N_VDotProd_NrnParallelLD ( N_Vector  x,
N_Vector  y 
)

Definition at line 651 of file nvector_nrnparallel_ld.cpp.

◆ N_VGetArrayPointer_NrnParallelLD()

realtype* N_VGetArrayPointer_NrnParallelLD ( N_Vector  v)

Definition at line 461 of file nvector_nrnparallel_ld.cpp.

◆ N_VInv_NrnParallelLD()

void N_VInv_NrnParallelLD ( N_Vector  x,
N_Vector  z 
)

Definition at line 627 of file nvector_nrnparallel_ld.cpp.

◆ N_VInvTest_NrnParallelLD()

booleantype N_VInvTest_NrnParallelLD ( N_Vector  x,
N_Vector  z 
)

Definition at line 809 of file nvector_nrnparallel_ld.cpp.

◆ N_VL1Norm_NrnParallelLD()

realtype N_VL1Norm_NrnParallelLD ( N_Vector  x)

Definition at line 779 of file nvector_nrnparallel_ld.cpp.

◆ N_VLinearSum_NrnParallelLD()

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

Definition at line 474 of file nvector_nrnparallel_ld.cpp.

◆ N_VMake_NrnParallelLD()

N_Vector N_VMake_NrnParallelLD ( MPI_Comm  comm,
long int  local_length,
long int  global_length,
realtype *  v_data 
)

Definition at line 290 of file nvector_nrnparallel_ld.cpp.

◆ N_VMaxNorm_NrnParallelLD()

realtype N_VMaxNorm_NrnParallelLD ( N_Vector  x)

Definition at line 668 of file nvector_nrnparallel_ld.cpp.

◆ N_VMin_NrnParallelLD()

realtype N_VMin_NrnParallelLD ( N_Vector  x)

Definition at line 733 of file nvector_nrnparallel_ld.cpp.

◆ N_VMinQuotient_NrnParallelLD()

realtype N_VMinQuotient_NrnParallelLD ( N_Vector  num,
N_Vector  denom 
)

Definition at line 870 of file nvector_nrnparallel_ld.cpp.

◆ N_VNew_NrnParallelLD()

N_Vector N_VNew_NrnParallelLD ( MPI_Comm  comm,
long int  local_length,
long int  global_length 
)

Definition at line 188 of file nvector_nrnparallel_ld.cpp.

◆ N_VNewEmpty_NrnParallelLD()

N_Vector N_VNewEmpty_NrnParallelLD ( MPI_Comm  comm,
long int  local_length,
long int  global_length 
)

Definition at line 106 of file nvector_nrnparallel_ld.cpp.

◆ N_VNewVectorArray_NrnParallelLD()

N_Vector* N_VNewVectorArray_NrnParallelLD ( int  count,
MPI_Comm  comm,
long int  local_length,
long int  global_length 
)

Definition at line 313 of file nvector_nrnparallel_ld.cpp.

◆ N_VNewVectorArrayEmpty_NrnParallelLD()

N_Vector* N_VNewVectorArrayEmpty_NrnParallelLD ( int  count,
MPI_Comm  comm,
long int  local_length,
long int  global_length 
)

Definition at line 343 of file nvector_nrnparallel_ld.cpp.

◆ N_VPrint_NrnParallelLD()

void N_VPrint_NrnParallelLD ( N_Vector  x)

Definition at line 385 of file nvector_nrnparallel_ld.cpp.

◆ N_VProd_NrnParallelLD()

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

Definition at line 567 of file nvector_nrnparallel_ld.cpp.

◆ N_VScale_NrnParallelLD()

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

Definition at line 593 of file nvector_nrnparallel_ld.cpp.

◆ N_VSetArrayPointer_NrnParallelLD()

void N_VSetArrayPointer_NrnParallelLD ( realtype *  v_data,
N_Vector  v 
)

Definition at line 469 of file nvector_nrnparallel_ld.cpp.

◆ N_VSpace_NrnParallelLD()

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

Definition at line 446 of file nvector_nrnparallel_ld.cpp.

◆ N_VWL2Norm_NrnParallelLD()

realtype N_VWL2Norm_NrnParallelLD ( N_Vector  x,
N_Vector  w 
)

Definition at line 759 of file nvector_nrnparallel_ld.cpp.

◆ N_VWrmsNorm_NrnParallelLD()

realtype N_VWrmsNorm_NrnParallelLD ( N_Vector  x,
N_Vector  w 
)

Definition at line 688 of file nvector_nrnparallel_ld.cpp.

◆ N_VWrmsNormMask_NrnParallelLD()

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

Definition at line 709 of file nvector_nrnparallel_ld.cpp.

◆ VAllReduce_long_NrnParallelLD()

static ldrealtype VAllReduce_long_NrnParallelLD ( ldrealtype  d,
int  op,
MPI_Comm  comm 
)
static

Definition at line 943 of file nvector_nrnparallel_ld.cpp.

◆ VAllReduce_NrnParallelLD()

static realtype VAllReduce_NrnParallelLD ( realtype  d,
int  op,
MPI_Comm  comm 
)
static

Definition at line 907 of file nvector_nrnparallel_ld.cpp.

◆ Vaxpy_NrnParallelLD()

static void Vaxpy_NrnParallelLD ( realtype  a,
N_Vector  x,
N_Vector  y 
)
static

Definition at line 1067 of file nvector_nrnparallel_ld.cpp.

◆ VCopy_NrnParallelLD()

static void VCopy_NrnParallelLD ( N_Vector  x,
N_Vector  z 
)
static

Definition at line 965 of file nvector_nrnparallel_ld.cpp.

◆ VDiff_NrnParallelLD()

static void VDiff_NrnParallelLD ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 990 of file nvector_nrnparallel_ld.cpp.

◆ VLin1_NrnParallelLD()

static void VLin1_NrnParallelLD ( realtype  a,
N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 1041 of file nvector_nrnparallel_ld.cpp.

◆ VLin2_NrnParallelLD()

static void VLin2_NrnParallelLD ( realtype  a,
N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 1054 of file nvector_nrnparallel_ld.cpp.

◆ VNeg_NrnParallelLD()

static void VNeg_NrnParallelLD ( N_Vector  x,
N_Vector  z 
)
static

Definition at line 1003 of file nvector_nrnparallel_ld.cpp.

◆ VScaleBy_NrnParallelLD()

static void VScaleBy_NrnParallelLD ( realtype  a,
N_Vector  x 
)
static

Definition at line 1091 of file nvector_nrnparallel_ld.cpp.

◆ VScaleDiff_NrnParallelLD()

static void VScaleDiff_NrnParallelLD ( realtype  c,
N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 1028 of file nvector_nrnparallel_ld.cpp.

◆ VScaleSum_NrnParallelLD()

static void VScaleSum_NrnParallelLD ( realtype  c,
N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 1015 of file nvector_nrnparallel_ld.cpp.

◆ VSum_NrnParallelLD()

static void VSum_NrnParallelLD ( N_Vector  x,
N_Vector  y,
N_Vector  z 
)
static

Definition at line 977 of file nvector_nrnparallel_ld.cpp.

Variable Documentation

◆ nrnmpi_comm

MPI_Comm nrnmpi_comm
extern