#include <../../nrnconf.h>
#include <algorithm>
#include <string>
#include <string_view>
#include <fstream>
#include "model.h"
#include "nrnassrt.h"
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
#include "units.h"
#include <assert.h>
#include <cstring>
#include <unistd.h>
#include <fcntl.h>
#include "embedded_nrnunits.lib"
Go to the source code of this file.
|
| double | fabs (double) |
| |
| void | diag (const char *, const char *) |
| |
| double | getflt () |
| |
| void | fperr (int) |
| |
| int | lookup (char *name, unit *up, int den, int c) |
| |
| struct table * | hash_table (const char *) |
| |
| void | chkfperror () |
| |
| void | units (unit *) |
| |
| int | pu (int, int, int) |
| |
| int | convr (unit *) |
| |
| void | units_cpp_init () |
| |
| int | get () |
| |
| void | Unit_push (const char *) |
| |
| static FILE * | open_embedded_nrnunits_as_file () |
| |
| static int | Getc (FILE *inp) |
| |
| static std::string | neuronhome () |
| |
| const char * | Unit_str (unit *up) |
| |
| void | unit_pop () |
| |
| void | unit_swap () |
| |
| double | unit_mag () |
| |
| void | unit_mag_mul (double d) |
| |
| void | punit () |
| |
| void | ucopypop (unit *up) |
| |
| void | ucopypush (unit *up) |
| |
| void | unit_push_num (double d) |
| |
| void | unitcheck (char *s) |
| |
| const char * | unit_str () |
| |
| static void | install_units_help (char *s1, char *s2) |
| |
| void | install_units (char *s1, char *s2) |
| |
| void | check_num () |
| |
| void | unit_mul () |
| |
| void | unit_div () |
| |
| void | Unit_exponent (int val) |
| |
| int | unit_cmp_exact () |
| |
| void | Unit_cmp () |
| |
| int | unit_diff () |
| |
| void | dimensionless () |
| |
| void | unit_less () |
| |
| void | unit_stk_clean () |
| |
| static void | units_alloc () |
| |
| void | unit_init () |
| |
| void | modl_units () |
| |
| static int | equal (const char *c1, const char *c2) |
| |
| void | nrnunit_str (char(&buf)[NRN_BUFSIZE], const char *name, const char *u1, const char *u2) |
| |
◆ IFUNITS
◆ NTAB
◆ OUTTOLERANCE
| #define OUTTOLERANCE |
( |
|
arg1, |
|
|
|
arg2 |
|
) |
| (fabs(arg2 / arg1 - 1.) > 1.e-5) |
◆ UNIT_STK_SIZE
◆ check_num()
◆ chkfperror()
◆ convr()
◆ diag()
| void diag |
( |
const char * |
s1, |
|
|
const char * |
s2 |
|
) |
| |
◆ dimensionless()
◆ equal()
| static int equal |
( |
const char * |
c1, |
|
|
const char * |
c2 |
|
) |
| |
|
static |
◆ fabs()
◆ fperr()
◆ get()
◆ Getc()
| static int Getc |
( |
FILE * |
inp | ) |
|
|
static |
◆ getflt()
◆ hash_table()
| struct table * hash_table |
( |
const char * |
name | ) |
|
◆ install_units()
| void install_units |
( |
char * |
s1, |
|
|
char * |
s2 |
|
) |
| |
◆ install_units_help()
| static void install_units_help |
( |
char * |
s1, |
|
|
char * |
s2 |
|
) |
| |
|
static |
◆ lookup()
| int lookup |
( |
char * |
name, |
|
|
unit * |
up, |
|
|
int |
den, |
|
|
int |
c |
|
) |
| |
◆ modl_units()
◆ neuronhome()
| static std::string neuronhome |
( |
| ) |
|
|
static |
◆ nrnunit_str()
| void nrnunit_str |
( |
char(&) |
buf[NRN_BUFSIZE], |
|
|
const char * |
name, |
|
|
const char * |
u1, |
|
|
const char * |
u2 |
|
) |
| |
◆ open_embedded_nrnunits_as_file()
| static FILE* open_embedded_nrnunits_as_file |
( |
| ) |
|
|
static |
◆ pu()
| int pu |
( |
int |
u, |
|
|
int |
i, |
|
|
int |
f |
|
) |
| |
◆ punit()
◆ ucopypop()
| void ucopypop |
( |
unit * |
up | ) |
|
◆ ucopypush()
| void ucopypush |
( |
unit * |
up | ) |
|
◆ Unit_cmp()
◆ unit_cmp_exact()
◆ unit_diff()
◆ unit_div()
◆ Unit_exponent()
| void Unit_exponent |
( |
int |
val | ) |
|
◆ unit_init()
◆ unit_less()
◆ unit_mag()
◆ unit_mag_mul()
| void unit_mag_mul |
( |
double |
d | ) |
|
◆ unit_mul()
◆ unit_pop()
◆ Unit_push()
| void Unit_push |
( |
const char * |
str | ) |
|
◆ unit_push_num()
| void unit_push_num |
( |
double |
d | ) |
|
◆ unit_stk_clean()
◆ unit_str()
◆ Unit_str()
| const char* Unit_str |
( |
unit * |
up | ) |
|
◆ unit_swap()
◆ unitcheck()
| void unitcheck |
( |
char * |
s | ) |
|
◆ units()
◆ units_alloc()
| static void units_alloc |
( |
| ) |
|
|
static |
◆ units_cpp_init()
◆ dfile
| char const* const dfile = "/usr/lib/units" |
|
static |
◆ dfilealt
| char const* const dfilealt = "../../share/lib/nrnunits.lib" |
|
static |
◆ dumpflg
◆ embedded_nrnunits
| constexpr std::string_view embedded_nrnunits = |
|
staticconstexpr |
◆ fperrc
◆ inpfile
◆ names
◆ pc
◆ peekc
◆ prefix
Initial value:= {{1e-18, "atto"},
{1e-15, "femto"},
{1e-12, "pico"},
{1e-9, "nano"},
{1e-6, "micro"},
{1e-3, "milli"},
{1e-2, "centi"},
{1e-1, "deci"},
{1e1, "deka"},
{1e2, "hecta"},
{1e2, "hecto"},
{1e3, "kilo"},
{1e6, "mega"},
{1e6, "meg"},
{1e9, "giga"},
{1e12, "tera"},
{0.0, nullptr}}
◆ table
◆ ucp
◆ unames
◆ unit_stack
◆ unitonflag
◆ UnitsOn
◆ usp
| struct unit * usp {nullptr} |
|
static |