--- /srv/reproducible-results/rbuild-debian/r-b-build.piMpXTmC/b1/maloc_1.5-1_i386.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.piMpXTmC/b2/maloc_1.5-1_i386.changes ├── Files │ @@ -1,4 +1,4 @@ │ │ - 3d09ff27153f388918c3422b76863535 122180 libdevel optional libmaloc-dev_1.5-1_i386.deb │ + b53c965be58a0784018851380dc774d3 122140 libdevel optional libmaloc-dev_1.5-1_i386.deb │ b13bdff22fec98b3c0a718d1a5f715b5 201656 debug optional libmaloc1-dbgsym_1.5-1_i386.deb │ 2393ad43de71dd5d4b25810329f56878 71944 libs optional libmaloc1_1.5-1_i386.deb ├── libmaloc-dev_1.5-1_i386.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2020-03-28 08:32:11.000000 debian-binary │ │ --rw-r--r-- 0 0 0 5456 2020-03-28 08:32:11.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 116532 2020-03-28 08:32:11.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 5452 2020-03-28 08:32:11.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 116496 2020-03-28 08:32:11.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -22,62 +22,62 @@ │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 941 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/changelog.Debian.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2759 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/copyright │ │ │ │ drwxr-xr-x 0 root (0) root (0) 0 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 102678 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00002.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 34019 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00002_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3831 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00003.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1127 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00004.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 14174 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00005.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18584 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00005_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1152 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00006.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1310 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00007.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1129 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00004.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 12339 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00005.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16675 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00005_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1273 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00006.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1004 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00007.dot │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5867 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00008.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6411 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00008_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1408 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00009.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1407 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00009.dot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 701 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00010.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 12339 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00011.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16675 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00011_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1274 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00012.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1004 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00013.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 17978 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00014.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 24222 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00014_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1158 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00015.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1319 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00016.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 17978 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00011.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 24222 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00011_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1157 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00012.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1319 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00013.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 14174 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00014.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18584 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00014_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1150 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00015.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1310 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00016.dot │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17659 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00017.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 36490 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00017_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1148 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00018.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1147 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00018.dot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1108 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00019.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 86130 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00020.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 36241 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00020_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 717 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00021.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 4020 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00022.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 18643 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00023.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 40474 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00023_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 853 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00024.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3181 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00025.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 18643 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00020.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 40474 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00020_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 853 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00021.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3181 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00022.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 86130 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00023.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 36241 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00023_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 717 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00024.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 4020 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00025.dot │ │ │ │ -rw-r--r-- 0 root (0) root (0) 17560 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00026.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25468 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00026_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 717 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00027.dot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3601 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00028.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 54413 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00029.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 23410 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00029_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 704 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00030.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3191 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00031.dot │ │ │ │ --rw-r--r-- 0 root (0) root (0) 28830 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00032.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 53368 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00032_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 805 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00033.dot.gz │ │ │ │ --rw-r--r-- 0 root (0) root (0) 3202 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00034.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 28830 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00029.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 53368 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00029_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 805 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00030.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3202 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00031.dot │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 54413 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00032.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 23410 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00032_source.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 704 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00033.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 3191 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00034.dot │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5032 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00035.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5722 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00035_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1091 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00036.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1090 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00036.dot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2895 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00037.dot │ │ │ │ -rw-r--r-- 0 root (0) root (0) 4710 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00038.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 5011 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00038_source.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1459 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00039.dot.gz │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1458 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00039.dot.gz │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1997 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00041.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 6016 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00041_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1991 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00044.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2307 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00044_source.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3596 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00047.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 38748 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00048.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22555 2020-03-28 08:32:11.000000 ./usr/share/doc/libmaloc-dev/html/a00049.html │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00004.dot.gz │ │ │ │ ├── a00004.dot │ │ │ │ │ @@ -7,46 +7,46 @@ │ │ │ │ │ Node1 [id="Node000001",label="maloc_base.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ │ Node1 -> Node3 [id="edge2_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ │ Node3 -> Node2 [id="edge3_Node000003_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node4 [id="edge4_Node000001_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node4 [id="Node000004",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ + Node4 [id="Node000004",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ Node4 -> Node5 [id="edge5_Node000004_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node5 [id="Node000005",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ │ + Node5 [id="Node000005",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ │ Node5 -> Node3 [id="edge6_Node000005_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node6 [id="edge7_Node000001_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node6 [id="Node000006",label="vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ + Node6 [id="Node000006",label="vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ Node6 -> Node7 [id="edge8_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 [id="Node000007",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ │ Node7 -> Node2 [id="edge9_Node000007_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 -> Node3 [id="edge10_Node000007_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 -> Node4 [id="edge11_Node000007_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 -> Node5 [id="edge12_Node000007_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 -> Node8 [id="edge13_Node000007_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ + Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ Node8 -> Node5 [id="edge14_Node000008_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node7 -> Node9 [id="edge15_Node000007_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node9 [id="Node000009",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ │ Node9 -> Node2 [id="edge16_Node000009_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node9 -> Node3 [id="edge17_Node000009_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node10 [id="edge18_Node000001_Node000010",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node10 [id="Node000010",label="vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ Node10 -> Node11 [id="edge19_Node000010_Node000011",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node11 [id="Node000011",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node11 [id="Node000011",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node11 -> Node7 [id="edge20_Node000011_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node10 -> Node7 [id="edge21_Node000010_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node5 [id="edge22_Node000001_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node8 [id="edge23_Node000001_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node12 [id="edge24_Node000001_Node000012",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node12 [id="Node000012",label="vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node12 [id="Node000012",label="vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node12 -> Node6 [id="edge25_Node000012_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node12 -> Node11 [id="edge26_Node000012_Node000011",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node12 -> Node7 [id="edge27_Node000012_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node13 [id="edge28_Node000001_Node000013",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node13 [id="Node000013",label="vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ + Node13 [id="Node000013",label="vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ Node13 -> Node7 [id="edge29_Node000013_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node11 [id="edge30_Node000001_Node000011",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node9 [id="edge31_Node000001_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node1 -> Node7 [id="edge32_Node000001_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00005.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vmpi.h File Reference │ │ │ │ +MALOC: vmp.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -43,95 +43,89 @@ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ Typedefs | │ │ │ │ Functions
│ │ │ │ -
vmpi.h File Reference
│ │ │ │ +
vmp.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Class Vmpi: a Virtual MPI communication layer object. │ │ │ │ +

Class Vmp: a Virtual MPI communication layer object. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ #include <maloc/vsys.h>
│ │ │ │ +#include <maloc/vmpi.h>
│ │ │ │ +#include <maloc/vcom.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vmpi.h:
│ │ │ │ +Include dependency graph for vmp.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  sVmpi
 Class Vmpi: Definition. More...
struct  sVmp
 Contains public data members for Vmp class. More...
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Typedefs

typedef struct sVmpi Vmpi
 Declaration of the Vmpi class as the Vmpi structure.
 
typedef struct sVmp Vmp
 Declaration of the Vmp class as teh Vmp structure.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

int Vmpi_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vmpi_finalize (void)
 The Vmp finalizer.
 
VmpiVmpi_ctor (void)
 The Vmpi constructor.
 
void Vmpi_dtor (Vmpi **thee)
 The Vmpi destructor.
 
int Vmpi_rank (Vmpi *thee)
 Return my processor ID.
│ │ │ │ +
int Vmp_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vmp_finalize (void)
 The Vmp finalizer.
 
VmpVmp_ctor (void)
 The Vmp constructor.
 
void Vmp_dtor (Vmp **thee)
 The Vmp destructor.
 
int Vmp_rank (Vmp *thee)
 Return my processor ID.
 
int Vmp_size (Vmp *thee)
 Return the number of processors involved.
│ │ │ │
 
int Vmpi_size (Vmpi *thee)
 Return the number of processors involved.
 
int Vmpi_barr (Vmpi *thee)
 An MPI barrier.
│ │ │ │ +
 
int Vmp_barr (Vmp *thee)
 An MPI barrier.
│ │ │ │
 
int Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI blocking send.
 
int Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize)
 An MPI blocking receive.
 
int Vmpi_bcast (Vmpi *thee, char *buf, int bufsize)
 An MPI broadcast.
 
int Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
 An MPI reduce.
│ │ │ │ +
 
int Vmp_send (Vmp *thee, int des, char *buf, int bufsize)
 An MPI blocking send.
│ │ │ │
 
int Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI non-blocking send.
 
 
int Vmp_recv (Vmp *thee, int src, char *buf, int bufsize)
 An MPI blocking receive.
│ │ │ │ +
 
│ │ │ │

Detailed Description

│ │ │ │ -

Class Vmpi: a Virtual MPI communication layer object.

│ │ │ │ +

Class Vmp: a Virtual MPI communication layer object.

│ │ │ │
Author
Michael Holst
│ │ │ │
Note
None
│ │ │ │
Version
│ │ │ │ -
Id
vmpi.h,v 1.29 2010/08/12 05:40:23 fetk Exp
│ │ │ │ +
Id
vmp.h,v 1.22 2010/08/12 05:40:23 fetk Exp
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │  * License as published by the Free Software Foundation; either
│ │ │ │ ├── html2text {}
│ │ │ │ │ @@ -4,79 +4,73 @@
│ │ │ │ │  
│ │ │ │ │  MALOC 0.1
│ │ │ │ │  
│ │ │ │ │      * src
│ │ │ │ │      * psh
│ │ │ │ │      * maloc
│ │ │ │ │  Classes | Typedefs | Functions
│ │ │ │ │ -vmpi.h File Reference
│ │ │ │ │ -Vmpi_class
│ │ │ │ │ -Class Vmpi: a Virtual MPI communication layer object. More...
│ │ │ │ │ +vmp.h File Reference
│ │ │ │ │ +Vmp_class
│ │ │ │ │ +Class Vmp: a Virtual MPI communication layer object. More...
│ │ │ │ │  #include 
│ │ │ │ │  #include 
│ │ │ │ │ -Include dependency graph for vmpi.h:
│ │ │ │ │ +#include 
│ │ │ │ │ +#include 
│ │ │ │ │ +Include dependency graph for vmp.h:
│ │ │ │ │  This graph shows which files directly or indirectly include this file:
│ │ │ │ │  Go_to_the_source_code_of_this_file.
│ │ │ │ │   Classes
│ │ │ │ │ -struct  sVmpi
│ │ │ │ │ -        Class Vmpi: Definition. More...
│ │ │ │ │ +struct  sVmp
│ │ │ │ │ +        Contains public data members for Vmp class. More...
│ │ │ │ │   
│ │ │ │ │   Typedefs
│ │ │ │ │ -typedef struct sVmpi Vmpi
│ │ │ │ │ -                     Declaration of the Vmpi class as the Vmpi structure.
│ │ │ │ │ +typedef struct sVmp Vmp
│ │ │ │ │ +                    Declaration of the Vmp class as teh Vmp structure.
│ │ │ │ │   
│ │ │ │ │   Functions
│ │ │ │ │ -   int Vmpi_init (int *argc, char ***argv)
│ │ │ │ │ -       The Vmp initializer.
│ │ │ │ │ +  int Vmp_init (int *argc, char ***argv)
│ │ │ │ │ +      The Vmp initializer.
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_finalize (void)
│ │ │ │ │ -       The Vmp finalizer.
│ │ │ │ │ +  int Vmp_finalize (void)
│ │ │ │ │ +      The Vmp finalizer.
│ │ │ │ │   
│ │ │ │ │ -Vmpi * Vmpi_ctor (void)
│ │ │ │ │ -       The Vmpi constructor.
│ │ │ │ │ +Vmp * Vmp_ctor (void)
│ │ │ │ │ +      The Vmp constructor.
│ │ │ │ │   
│ │ │ │ │ -  void Vmpi_dtor (Vmpi **thee)
│ │ │ │ │ -       The Vmpi destructor.
│ │ │ │ │ + void Vmp_dtor (Vmp **thee)
│ │ │ │ │ +      The Vmp destructor.
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_rank (Vmpi *thee)
│ │ │ │ │ -       Return my processor ID.
│ │ │ │ │ -
│ │ │ │ │ - 
│ │ │ │ │ -   int Vmpi_size (Vmpi *thee)
│ │ │ │ │ -       Return the number of processors involved.
│ │ │ │ │ +  int Vmp_rank (Vmp *thee)
│ │ │ │ │ +      Return my processor ID.
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_barr (Vmpi *thee)
│ │ │ │ │ -       An MPI barrier.
│ │ │ │ │ +  int Vmp_size (Vmp *thee)
│ │ │ │ │ +      Return the number of processors involved.
│ │ │ │ │  
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize)
│ │ │ │ │ -       An MPI blocking send.
│ │ │ │ │ - 
│ │ │ │ │ -   int Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize)
│ │ │ │ │ -       An MPI blocking receive.
│ │ │ │ │ - 
│ │ │ │ │ -   int Vmpi_bcast (Vmpi *thee, char *buf, int bufsize)
│ │ │ │ │ -       An MPI broadcast.
│ │ │ │ │ +  int Vmp_barr (Vmp *thee)
│ │ │ │ │ +      An MPI barrier.
│ │ │ │ │ +
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
│ │ │ │ │ -       An MPI reduce.
│ │ │ │ │ +  int Vmp_send (Vmp *thee, int des, char *buf, int bufsize)
│ │ │ │ │ +      An MPI blocking send.
│ │ │ │ │  
│ │ │ │ │   
│ │ │ │ │ -   int Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize)
│ │ │ │ │ -       An MPI non-blocking send.
│ │ │ │ │ +  int Vmp_recv (Vmp *thee, int src, char *buf, int bufsize)
│ │ │ │ │ +      An MPI blocking receive.
│ │ │ │ │ +
│ │ │ │ │   
│ │ │ │ │  ***** Detailed Description *****
│ │ │ │ │ -Class Vmpi: a Virtual MPI communication layer object.
│ │ │ │ │ +Class Vmp: a Virtual MPI communication layer object.
│ │ │ │ │    Author
│ │ │ │ │        Michael Holst
│ │ │ │ │    Note
│ │ │ │ │        None
│ │ │ │ │    Version
│ │ │ │ │    Id
│ │ │ │ │ -      vmpi.h,v 1.29 2010/08/12 05:40:23 fetk Exp
│ │ │ │ │ +      vmp.h,v 1.22 2010/08/12 05:40:23 fetk Exp
│ │ │ │ │    Attention
│ │ │ │ │        *
│ │ │ │ │        * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │ │        * Copyright (C) 1994-- Michael Holst
│ │ │ │ │        *
│ │ │ │ │        * This library is free software; you can redistribute it and/or
│ │ │ │ │        * modify it under the terms of the GNU Lesser General Public
│ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00005_source.html
│ │ │ │ @@ -1,15 +1,15 @@
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ -MALOC: vmpi.h Source File
│ │ │ │ +MALOC: vmp.h Source File
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │  
│ │ │ │ @@ -44,94 +44,89 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
vmpi.h
│ │ │ │ +
vmp.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1
│ │ │ │ -
38#ifndef _VMPI_H_
│ │ │ │ -
39#define _VMPI_H_
│ │ │ │ -
40
│ │ │ │ -
41#include <maloc/maloc_base.h>
│ │ │ │ -
42
│ │ │ │ -
43#include <maloc/vsys.h>
│ │ │ │ -
44
│ │ │ │ -
45/*
│ │ │ │ -
46 * ***************************************************************************
│ │ │ │ -
47 * Class Vmpi: Parameters and datatypes
│ │ │ │ -
48 * ***************************************************************************
│ │ │ │ -
49 */
│ │ │ │ -
50
│ │ │ │ +
37#ifndef _VMP_H_
│ │ │ │ +
38#define _VMP_H_
│ │ │ │ +
39
│ │ │ │ +
40#include <maloc/maloc_base.h>
│ │ │ │ +
41
│ │ │ │ +
42#include <maloc/vsys.h>
│ │ │ │ +
43#include <maloc/vmpi.h>
│ │ │ │ +
44#include <maloc/vcom.h>
│ │ │ │ +
45
│ │ │ │ +
46/*
│ │ │ │ +
47 * ***************************************************************************
│ │ │ │ +
48 * Class Vmp: Parameters and datatypes
│ │ │ │ +
49 * ***************************************************************************
│ │ │ │ +
50 */
│ │ │ │
51
│ │ │ │ -
│ │ │ │ -
57struct sVmpi {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
60};
│ │ │ │ +
│ │ │ │ +
58struct sVmp {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
61};
│ │ │ │
│ │ │ │ -
61
│ │ │ │ -
67typedef struct sVmpi Vmpi;
│ │ │ │ -
68
│ │ │ │ -
69/*
│ │ │ │ -
70 * ***************************************************************************
│ │ │ │ -
71 * Class Vmpi: Inlineable methods (vmpi.c)
│ │ │ │ -
72 * ***************************************************************************
│ │ │ │ -
73 */
│ │ │ │ -
74
│ │ │ │ -
75#if !defined(VINLINE_MALOC)
│ │ │ │ -
76#else /* if defined(VINLINE_MALOC) */
│ │ │ │ -
77#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ -
78
│ │ │ │ -
88int Vmpi_init(int *argc, char ***argv);
│ │ │ │ -
89
│ │ │ │ -
97int Vmpi_finalize(void);
│ │ │ │ -
98
│ │ │ │ - │ │ │ │ -
107
│ │ │ │ -
116void Vmpi_dtor(Vmpi **thee);
│ │ │ │ -
117
│ │ │ │ -
126int Vmpi_rank(Vmpi *thee);
│ │ │ │ -
127
│ │ │ │ -
136int Vmpi_size(Vmpi *thee);
│ │ │ │ -
137
│ │ │ │ -
146int Vmpi_barr(Vmpi *thee);
│ │ │ │ -
147
│ │ │ │ -
159int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize);
│ │ │ │ -
160
│ │ │ │ -
172int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize);
│ │ │ │ -
173
│ │ │ │ -
184int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize);
│ │ │ │ -
185
│ │ │ │ -
197int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize);
│ │ │ │ -
198
│ │ │ │ -
210int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize);
│ │ │ │ -
211
│ │ │ │ -
212#endif /* _VMPI_H_ */
│ │ │ │ -
213
│ │ │ │ +
62
│ │ │ │ +
68typedef struct sVmp Vmp;
│ │ │ │ +
69
│ │ │ │ +
70/*
│ │ │ │ +
71 * ***************************************************************************
│ │ │ │ +
72 * Class Vmp: Inlineable methods (vmp.c)
│ │ │ │ +
73 * ***************************************************************************
│ │ │ │ +
74 */
│ │ │ │ +
75
│ │ │ │ +
76#if !defined(VINLINE_MALOC)
│ │ │ │ +
77#else /* if defined(VINLINE_MALOC) */
│ │ │ │ +
78#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ +
79
│ │ │ │ +
80
│ │ │ │ +
90int Vmp_init(int *argc, char ***argv);
│ │ │ │ +
91
│ │ │ │ +
99int Vmp_finalize(void);
│ │ │ │ +
100
│ │ │ │ + │ │ │ │ +
109
│ │ │ │ +
118void Vmp_dtor(Vmp **thee);
│ │ │ │ +
119
│ │ │ │ +
128int Vmp_rank(Vmp *thee);
│ │ │ │ +
129
│ │ │ │ +
138int Vmp_size(Vmp *thee);
│ │ │ │ +
139
│ │ │ │ +
148int Vmp_barr(Vmp *thee);
│ │ │ │ +
149
│ │ │ │ +
161int Vmp_send(Vmp *thee, int des, char *buf, int bufsize);
│ │ │ │ +
162
│ │ │ │ +
174int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize);
│ │ │ │ +
175
│ │ │ │ +
176#endif /* _VMP_H_ */
│ │ │ │ +
177
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │ +
Class Vcom: virtual (currently just MPI) communications layer.
│ │ │ │ +
Class Vmpi: a Virtual MPI communication layer object.
│ │ │ │
The primary header for VSYS. (Virtual SYStem utilities library.)
│ │ │ │ -
int Vmpi_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ -
int Vmpi_finalize(void)
The Vmp finalizer.
│ │ │ │ -
int Vmpi_size(Vmpi *thee)
Return the number of processors involved.
│ │ │ │ -
int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
An MPI reduce.
│ │ │ │ -
int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize)
An MPI blocking receive.
│ │ │ │ -
int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize)
An MPI non-blocking send.
│ │ │ │ -
void Vmpi_dtor(Vmpi **thee)
The Vmpi destructor.
│ │ │ │ -
int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize)
An MPI blocking send.
│ │ │ │ -
Vmpi * Vmpi_ctor(void)
The Vmpi constructor.
│ │ │ │ -
int Vmpi_barr(Vmpi *thee)
An MPI barrier.
│ │ │ │ -
int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize)
An MPI broadcast.
│ │ │ │ -
int Vmpi_rank(Vmpi *thee)
Return my processor ID.
│ │ │ │ -
Class Vmpi: Definition.
Definition vmpi.h:57
│ │ │ │ -
int mpi_rank
Definition vmpi.h:58
│ │ │ │ -
int mpi_size
Definition vmpi.h:59
│ │ │ │ +
int Vmp_finalize(void)
The Vmp finalizer.
│ │ │ │ +
int Vmp_send(Vmp *thee, int des, char *buf, int bufsize)
An MPI blocking send.
│ │ │ │ +
int Vmp_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ +
int Vmp_rank(Vmp *thee)
Return my processor ID.
│ │ │ │ +
int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize)
An MPI blocking receive.
│ │ │ │ +
Vmp * Vmp_ctor(void)
The Vmp constructor.
│ │ │ │ +
void Vmp_dtor(Vmp **thee)
The Vmp destructor.
│ │ │ │ +
int Vmp_barr(Vmp *thee)
An MPI barrier.
│ │ │ │ +
int Vmp_size(Vmp *thee)
Return the number of processors involved.
│ │ │ │ +
Contains public data members for Vmp class.
Definition vmp.h:58
│ │ │ │ +
int mpi_rank
Definition vmp.h:59
│ │ │ │ +
int mpi_size
Definition vmp.h:60
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,123 +3,114 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * psh │ │ │ │ │ * maloc │ │ │ │ │ -vmpi.h │ │ │ │ │ +vmp.h │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ 1 │ │ │ │ │ - 38#ifndef _VMPI_H_ │ │ │ │ │ - 39#define _VMPI_H_ │ │ │ │ │ - 40 │ │ │ │ │ - 41#include │ │ │ │ │ - 42 │ │ │ │ │ - 43#include │ │ │ │ │ - 44 │ │ │ │ │ - 45/* │ │ │ │ │ - 46 * │ │ │ │ │ + 37#ifndef _VMP_H_ │ │ │ │ │ + 38#define _VMP_H_ │ │ │ │ │ + 39 │ │ │ │ │ + 40#include │ │ │ │ │ + 41 │ │ │ │ │ + 42#include │ │ │ │ │ + 43#include │ │ │ │ │ + 44#include │ │ │ │ │ + 45 │ │ │ │ │ + 46/* │ │ │ │ │ + 47 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 47 * Class Vmpi: Parameters and datatypes │ │ │ │ │ - 48 * │ │ │ │ │ + 48 * Class Vmp: Parameters and datatypes │ │ │ │ │ + 49 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 49 */ │ │ │ │ │ - 50 │ │ │ │ │ + 50 */ │ │ │ │ │ 51 │ │ │ │ │ -57struct sVmpi { │ │ │ │ │ -58 int mpi_rank; │ │ │ │ │ -59 int mpi_size; │ │ │ │ │ - 60}; │ │ │ │ │ - 61 │ │ │ │ │ -67typedef struct sVmpi Vmpi; │ │ │ │ │ - 68 │ │ │ │ │ - 69/* │ │ │ │ │ - 70 * │ │ │ │ │ +58struct sVmp { │ │ │ │ │ +59 int mpi_rank; │ │ │ │ │ +60 int mpi_size; │ │ │ │ │ + 61}; │ │ │ │ │ + 62 │ │ │ │ │ +68typedef struct sVmp Vmp; │ │ │ │ │ + 69 │ │ │ │ │ + 70/* │ │ │ │ │ + 71 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 71 * Class Vmpi: Inlineable methods (vmpi.c) │ │ │ │ │ - 72 * │ │ │ │ │ + 72 * Class Vmp: Inlineable methods (vmp.c) │ │ │ │ │ + 73 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 73 */ │ │ │ │ │ - 74 │ │ │ │ │ - 75#if !defined(VINLINE_MALOC) │ │ │ │ │ - 76#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ - 77#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ - 78 │ │ │ │ │ -88int Vmpi_init(int *argc, char ***argv); │ │ │ │ │ - 89 │ │ │ │ │ -97int Vmpi_finalize(void); │ │ │ │ │ - 98 │ │ │ │ │ -106Vmpi* Vmpi_ctor(void); │ │ │ │ │ - 107 │ │ │ │ │ -116void Vmpi_dtor(Vmpi **thee); │ │ │ │ │ - 117 │ │ │ │ │ -126int Vmpi_rank(Vmpi *thee); │ │ │ │ │ - 127 │ │ │ │ │ -136int Vmpi_size(Vmpi *thee); │ │ │ │ │ - 137 │ │ │ │ │ -146int Vmpi_barr(Vmpi *thee); │ │ │ │ │ - 147 │ │ │ │ │ -159int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize); │ │ │ │ │ - 160 │ │ │ │ │ -172int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize); │ │ │ │ │ - 173 │ │ │ │ │ -184int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize); │ │ │ │ │ - 185 │ │ │ │ │ -197int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize); │ │ │ │ │ - 198 │ │ │ │ │ -210int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize); │ │ │ │ │ - 211 │ │ │ │ │ - 212#endif /* _VMPI_H_ */ │ │ │ │ │ - 213 │ │ │ │ │ + 74 */ │ │ │ │ │ + 75 │ │ │ │ │ + 76#if !defined(VINLINE_MALOC) │ │ │ │ │ + 77#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ + 78#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ + 79 │ │ │ │ │ + 80 │ │ │ │ │ +90int Vmp_init(int *argc, char ***argv); │ │ │ │ │ + 91 │ │ │ │ │ +99int Vmp_finalize(void); │ │ │ │ │ + 100 │ │ │ │ │ +108Vmp* Vmp_ctor(void); │ │ │ │ │ + 109 │ │ │ │ │ +118void Vmp_dtor(Vmp **thee); │ │ │ │ │ + 119 │ │ │ │ │ +128int Vmp_rank(Vmp *thee); │ │ │ │ │ + 129 │ │ │ │ │ +138int Vmp_size(Vmp *thee); │ │ │ │ │ + 139 │ │ │ │ │ +148int Vmp_barr(Vmp *thee); │ │ │ │ │ + 149 │ │ │ │ │ +161int Vmp_send(Vmp *thee, int des, char *buf, int bufsize); │ │ │ │ │ + 162 │ │ │ │ │ +174int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize); │ │ │ │ │ + 175 │ │ │ │ │ + 176#endif /* _VMP_H_ */ │ │ │ │ │ + 177 │ │ │ │ │ maloc_base.h │ │ │ │ │ The base (or foundation) header for MALOC. │ │ │ │ │ +vcom.h │ │ │ │ │ +Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ │ +vmpi.h │ │ │ │ │ +Class Vmpi: a Virtual MPI communication layer object. │ │ │ │ │ vsys.h │ │ │ │ │ The primary header for VSYS. (Virtual SYStem utilities library.) │ │ │ │ │ -Vmpi_init │ │ │ │ │ -int Vmpi_init(int *argc, char ***argv) │ │ │ │ │ -The Vmp initializer. │ │ │ │ │ -Vmpi_finalize │ │ │ │ │ -int Vmpi_finalize(void) │ │ │ │ │ +Vmp_finalize │ │ │ │ │ +int Vmp_finalize(void) │ │ │ │ │ The Vmp finalizer. │ │ │ │ │ -Vmpi_size │ │ │ │ │ -int Vmpi_size(Vmpi *thee) │ │ │ │ │ -Return the number of processors involved. │ │ │ │ │ -Vmpi_reduce │ │ │ │ │ -int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize) │ │ │ │ │ -An MPI reduce. │ │ │ │ │ -Vmpi_recv │ │ │ │ │ -int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize) │ │ │ │ │ -An MPI blocking receive. │ │ │ │ │ -Vmpi_isend │ │ │ │ │ -int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ -An MPI non-blocking send. │ │ │ │ │ -Vmpi_dtor │ │ │ │ │ -void Vmpi_dtor(Vmpi **thee) │ │ │ │ │ -The Vmpi destructor. │ │ │ │ │ -Vmpi_send │ │ │ │ │ -int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ +Vmp_send │ │ │ │ │ +int Vmp_send(Vmp *thee, int des, char *buf, int bufsize) │ │ │ │ │ An MPI blocking send. │ │ │ │ │ -Vmpi_ctor │ │ │ │ │ -Vmpi * Vmpi_ctor(void) │ │ │ │ │ -The Vmpi constructor. │ │ │ │ │ -Vmpi_barr │ │ │ │ │ -int Vmpi_barr(Vmpi *thee) │ │ │ │ │ -An MPI barrier. │ │ │ │ │ -Vmpi_bcast │ │ │ │ │ -int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize) │ │ │ │ │ -An MPI broadcast. │ │ │ │ │ -Vmpi_rank │ │ │ │ │ -int Vmpi_rank(Vmpi *thee) │ │ │ │ │ +Vmp_init │ │ │ │ │ +int Vmp_init(int *argc, char ***argv) │ │ │ │ │ +The Vmp initializer. │ │ │ │ │ +Vmp_rank │ │ │ │ │ +int Vmp_rank(Vmp *thee) │ │ │ │ │ Return my processor ID. │ │ │ │ │ -sVmpi │ │ │ │ │ -Class Vmpi: Definition. │ │ │ │ │ -Definition vmpi.h:57 │ │ │ │ │ -sVmpi::mpi_rank │ │ │ │ │ +Vmp_recv │ │ │ │ │ +int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize) │ │ │ │ │ +An MPI blocking receive. │ │ │ │ │ +Vmp_ctor │ │ │ │ │ +Vmp * Vmp_ctor(void) │ │ │ │ │ +The Vmp constructor. │ │ │ │ │ +Vmp_dtor │ │ │ │ │ +void Vmp_dtor(Vmp **thee) │ │ │ │ │ +The Vmp destructor. │ │ │ │ │ +Vmp_barr │ │ │ │ │ +int Vmp_barr(Vmp *thee) │ │ │ │ │ +An MPI barrier. │ │ │ │ │ +Vmp_size │ │ │ │ │ +int Vmp_size(Vmp *thee) │ │ │ │ │ +Return the number of processors involved. │ │ │ │ │ +sVmp │ │ │ │ │ +Contains public data members for Vmp class. │ │ │ │ │ +Definition vmp.h:58 │ │ │ │ │ +sVmp::mpi_rank │ │ │ │ │ int mpi_rank │ │ │ │ │ -Definition vmpi.h:58 │ │ │ │ │ -sVmpi::mpi_size │ │ │ │ │ +Definition vmp.h:59 │ │ │ │ │ +sVmp::mpi_size │ │ │ │ │ int mpi_size │ │ │ │ │ -Definition vmpi.h:59 │ │ │ │ │ +Definition vmp.h:60 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00006.dot.gz │ │ │ │ ├── a00006.dot │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ -digraph "vmpi.h" │ │ │ │ │ +digraph "vmp.h" │ │ │ │ │ { │ │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ │ bgcolor="transparent"; │ │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ │ - Node1 [id="Node000001",label="vmpi.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ + Node1 [id="Node000001",label="vmp.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc/maloc_base.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00002.html",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="assert.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node4 [id="Node000004",label="ctype.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ @@ -37,25 +37,33 @@ │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 [id="Node000018",label="maloc/vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ │ Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node19 [id="edge19_Node000018_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node20 [id="edge21_Node000018_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node20 [id="Node000020",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ Node20 -> Node2 [id="edge22_Node000020_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node21 [id="edge23_Node000018_Node000021",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ + Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ Node21 -> Node2 [id="edge24_Node000021_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node21 -> Node19 [id="edge25_Node000021_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node22 [id="edge26_Node000018_Node000022",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node22 -> Node2 [id="edge27_Node000022_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node19 [id="edge28_Node000022_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node20 [id="edge29_Node000022_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node23 [id="edge30_Node000018_Node000023",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ + Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ Node23 -> Node2 [id="edge31_Node000023_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node1 -> Node24 [id="edge32_Node000001_Node000024",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node24 [id="Node000024",label="maloc/vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ + Node24 -> Node2 [id="edge33_Node000024_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node24 -> Node18 [id="edge34_Node000024_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node1 -> Node25 [id="edge35_Node000001_Node000025",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node25 [id="Node000025",label="maloc/vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ + Node25 -> Node2 [id="edge36_Node000025_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node25 -> Node18 [id="edge37_Node000025_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00007.dot │ │ │ │ @@ -1,14 +1,12 @@ │ │ │ │ -digraph "vmpi.h" │ │ │ │ +digraph "vmp.h" │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ - Node1 [id="Node000001",label="vmpi.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ + Node1 [id="Node000001",label="vmp.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node2 [id="Node000002",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 [id="Node000003",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ + Node3 [id="Node000003",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00008.html │ │ │ │ @@ -50,15 +50,15 @@ │ │ │ │
│ │ │ │ │ │ │ │

Header file for a simple parallel extension of ALOC's VSH. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ #include <maloc/vsys.h>
│ │ │ │ #include <maloc/vsh.h>
│ │ │ │ -#include <maloc/vmp.h>
│ │ │ │ +#include <maloc/vmp.h>
│ │ │ │
│ │ │ │ Include dependency graph for psh.h:
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00008_source.html │ │ │ │ @@ -55,23 +55,23 @@ │ │ │ │
32#ifndef _PSH_H_
│ │ │ │
33#define _PSH_H_
│ │ │ │
34
│ │ │ │
35#include <maloc/maloc_base.h>
│ │ │ │
36
│ │ │ │
37#include <maloc/vsys.h>
│ │ │ │
38#include <maloc/vsh.h>
│ │ │ │ -
39#include <maloc/vmp.h>
│ │ │ │ +
39#include <maloc/vmp.h>
│ │ │ │
40
│ │ │ │
52int Vsh_pshell(Vsh *thee, char *pPR, void *pthee,
│ │ │ │
53 int (*builtin)(void *thee, int argc, char **argv));
│ │ │ │
54
│ │ │ │
55#endif /* _PSH_H_ */
│ │ │ │
56
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │ -
Class Vmp: a Virtual MPI communication layer object.
│ │ │ │ +
Class Vmp: a Virtual MPI communication layer object.
│ │ │ │
Header file for vsh, a bourne-compatible shell.
│ │ │ │
The primary header for VSYS. (Virtual SYStem utilities library.)
│ │ │ │
int Vsh_pshell(Vsh *thee, char *pPR, void *pthee, int(*builtin)(void *thee, int argc, char **argv))
Drop-in replacement for Vsh_shell giving parallel extensions.
│ │ │ │
Contains public data members for Vsh class.
Definition vsh.h:56
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ +Macros | │ │ │ │ Typedefs | │ │ │ │ Functions
│ │ │ │ -
vmp.h File Reference
│ │ │ │ +
vcom.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Class Vmp: a Virtual MPI communication layer object. │ │ │ │ +

Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ #include <maloc/vsys.h>
│ │ │ │ -#include <maloc/vmpi.h>
│ │ │ │ -#include <maloc/vcom.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vmp.h:
│ │ │ │ +Include dependency graph for vcom.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  sVmp
 Contains public data members for Vmp class. More...
struct  sVcom
 Contains public data members for Vcom class. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Macros

#define VCOM_MPI_TAG   111
 A base value for MPI tags.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Typedefs

typedef struct sVmp Vmp
 Declaration of the Vmp class as teh Vmp structure.
 
typedef struct sVcom Vcom
 Declaration of the Vcom class as the Vcom structure
│ │ │ │ +
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

int Vmp_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vmp_finalize (void)
 The Vmp finalizer.
 
VmpVmp_ctor (void)
 The Vmp constructor.
 
void Vmp_dtor (Vmp **thee)
 The Vmp destructor.
 
int Vmp_rank (Vmp *thee)
 Return my processor ID.
 
int Vmp_size (Vmp *thee)
 Return the number of processors involved.
│ │ │ │ -
 
int Vmp_barr (Vmp *thee)
 An MPI barrier.
│ │ │ │ -
 
int Vmp_send (Vmp *thee, int des, char *buf, int bufsize)
 An MPI blocking send.
│ │ │ │ -
 
int Vmp_recv (Vmp *thee, int src, char *buf, int bufsize)
 An MPI blocking receive.
│ │ │ │ +
int Vcom_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vcom_finalize (void)
 The Vmp finalizer.
 
VcomVcom_ctor (int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI.
 
int Vcom_ctor2 (Vcom *thee, int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI. This is broken into two parts to be callable from FORTRAN.
 
void Vcom_dtor (Vcom **thee)
 Destroy the communications object.
 
void Vcom_dtor2 (Vcom *thee)
 Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
 
int Vcom_send (Vcom *thee, int des, void *buf, int len, int type, int block)
 Send a buffer. Returns 1 on success.
 
int Vcom_recv (Vcom *thee, int src, void *buf, int len, int type, int block)
 Receive a (character) buffer.
│ │ │ │ + The blocking flag is present, but not used. All receives are assumed to be blocking. A non-blocking receive would be very ugly to implement (signals or something?).
 
int Vcom_getCount (Vcom *thee, int src, int *length, int type)
 Perform a blocking probe to get the length (in number of items of specified type) of an incoming message and place it in the
│ │ │ │ + argument ``length".
 
int Vcom_reduce (Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, int op)
 Perform a reduction of the data across all processors. This is equivalent (and in the case of MPI is identical to) MPI_Allreduce. Basically, the specified operations are appleed to each member of
│ │ │ │ + the sendbuf across all processors and the results are written to recvbuf.
 
int Vcom_size (Vcom *thee)
 Get the number of PEs in communicator.
 
int Vcom_resize (Vcom *thee, int newsize)
 Resize (shrink) the communications group to include only newsize number of processors.
│ │ │ │ + Obsolete processes are given rank of -1 and size of 0.
 
int Vcom_rank (Vcom *thee)
 Get the ID of the local PE
│ │ │ │
 
 
int Vcom_barr (Vcom *thee)
 Synchronization barrier.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Class Vmp: a Virtual MPI communication layer object.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ +

Class Vcom: virtual (currently just MPI) communications layer.

│ │ │ │ +
Authors
Nathan Baker and Michael Holst
│ │ │ │
Note
None
│ │ │ │
Version
│ │ │ │ -
Id
vmp.h,v 1.22 2010/08/12 05:40:23 fetk Exp
│ │ │ │ +
Id
vcom.h,v 1.38 2010/08/12 05:40:23 fetk Exp
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │  * License as published by the Free Software Foundation; either
│ │ │ │ @@ -137,14 +159,31 @@
│ │ │ │  * Lesser General Public License for more details.
│ │ │ │  *
│ │ │ │  * You should have received a copy of the GNU Lesser General Public
│ │ │ │  * License along with this library; if not, write to the Free Software
│ │ │ │  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
│ │ │ │  * 
│ │ │ │  *  
│ │ │ │ -
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ VCOM_MPI_TAG

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define VCOM_MPI_TAG   111
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

A base value for MPI tags.

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,74 +3,107 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * psh │ │ │ │ │ * maloc │ │ │ │ │ -Classes | Typedefs | Functions │ │ │ │ │ -vmp.h File Reference │ │ │ │ │ -Vmp_class │ │ │ │ │ -Class Vmp: a Virtual MPI communication layer object. More... │ │ │ │ │ +Classes | Macros | Typedefs | Functions │ │ │ │ │ +vcom.h File Reference │ │ │ │ │ +Vcom_class │ │ │ │ │ +Class Vcom: virtual (currently just MPI) communications layer. More... │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -Include dependency graph for vmp.h: │ │ │ │ │ +Include dependency graph for vcom.h: │ │ │ │ │ This graph shows which files directly or indirectly include this file: │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  sVmp │ │ │ │ │ -  Contains public data members for Vmp class. More... │ │ │ │ │ +struct  sVcom │ │ │ │ │ +  Contains public data members for Vcom class. More... │ │ │ │ │ +  │ │ │ │ │ + Macros │ │ │ │ │ +#define VCOM_MPI_TAG   111 │ │ │ │ │ +  A base value for MPI tags. │ │ │ │ │   │ │ │ │ │ Typedefs │ │ │ │ │ -typedef struct sVmp Vmp │ │ │ │ │ -  Declaration of the Vmp class as teh Vmp structure. │ │ │ │ │ +typedef struct sVcom Vcom │ │ │ │ │ +  Declaration of the Vcom class as the Vcom structure │ │ │ │ │ + │ │ │ │ │   │ │ │ │ │ Functions │ │ │ │ │ - int Vmp_init (int *argc, char ***argv) │ │ │ │ │ -  The Vmp initializer. │ │ │ │ │ -  │ │ │ │ │ - int Vmp_finalize (void) │ │ │ │ │ -  The Vmp finalizer. │ │ │ │ │ + int Vcom_init (int *argc, char ***argv) │ │ │ │ │ +  The Vmp initializer. │ │ │ │ │   │ │ │ │ │ -Vmp * Vmp_ctor (void) │ │ │ │ │ -  The Vmp constructor. │ │ │ │ │ + int Vcom_finalize (void) │ │ │ │ │ +  The Vmp finalizer. │ │ │ │ │   │ │ │ │ │ - void Vmp_dtor (Vmp **thee) │ │ │ │ │ -  The Vmp destructor. │ │ │ │ │ +Vcom * Vcom_ctor (int commtype) │ │ │ │ │ +  Construct the communications object. This routine sets up data members │ │ │ │ │ + of class and initializes MPI. │ │ │ │ │ +  │ │ │ │ │ + int Vcom_ctor2 (Vcom *thee, int commtype) │ │ │ │ │ + Construct the communications object. This routine sets up data members │ │ │ │ │ +  of class and initializes MPI. This is broken into two parts to be │ │ │ │ │ + callable from FORTRAN. │ │ │ │ │ +  │ │ │ │ │ + void Vcom_dtor (Vcom **thee) │ │ │ │ │ +  Destroy the communications object. │ │ │ │ │ +  │ │ │ │ │ + void Vcom_dtor2 (Vcom *thee) │ │ │ │ │ +  Destroy the communications object. This is broken into two parts to be │ │ │ │ │ + callable from FORTRAN. │ │ │ │ │ +  │ │ │ │ │ + int Vcom_send (Vcom *thee, int des, void *buf, int len, int type, int │ │ │ │ │ + block) │ │ │ │ │ +  Send a buffer. Returns 1 on success. │ │ │ │ │ +  │ │ │ │ │ + int Vcom_recv (Vcom *thee, int src, void *buf, int len, int type, int │ │ │ │ │ + block) │ │ │ │ │ + Receive a (character) buffer. │ │ │ │ │ +  The blocking flag is present, but not used. All receives are assumed to │ │ │ │ │ + be blocking. A non-blocking receive would be very ugly to implement │ │ │ │ │ + (signals or something?). │ │ │ │ │ +  │ │ │ │ │ + int Vcom_getCount (Vcom *thee, int src, int *length, int type) │ │ │ │ │ + Perform a blocking probe to get the length (in number of items of │ │ │ │ │ +  specified type) of an incoming message and place it in the │ │ │ │ │ + argument ``length". │ │ │ │ │ +  │ │ │ │ │ + int Vcom_reduce (Vcom *thee, void *sendbuf, void *recvbuf, int length, int │ │ │ │ │ + type, int op) │ │ │ │ │ + Perform a reduction of the data across all processors. This is │ │ │ │ │ + equivalent (and in the case of MPI is identical to) MPI_Allreduce. │ │ │ │ │ +  Basically, the specified operations are appleed to each member of │ │ │ │ │ + the sendbuf across all processors and the results are written to │ │ │ │ │ + recvbuf. │ │ │ │ │ +  │ │ │ │ │ + int Vcom_size (Vcom *thee) │ │ │ │ │ +  Get the number of PEs in communicator. │ │ │ │ │ +  │ │ │ │ │ + int Vcom_resize (Vcom *thee, int newsize) │ │ │ │ │ + Resize (shrink) the communications group to include only newsize number │ │ │ │ │ +  of processors. │ │ │ │ │ + Obsolete processes are given rank of -1 and size of 0. │ │ │ │ │   │ │ │ │ │ - int Vmp_rank (Vmp *thee) │ │ │ │ │ -  Return my processor ID. │ │ │ │ │ -  │ │ │ │ │ - int Vmp_size (Vmp *thee) │ │ │ │ │ -  Return the number of processors involved. │ │ │ │ │ + int Vcom_rank (Vcom *thee) │ │ │ │ │ +  Get the ID of the local PE │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ - int Vmp_barr (Vmp *thee) │ │ │ │ │ -  An MPI barrier. │ │ │ │ │ - │ │ │ │ │ -  │ │ │ │ │ - int Vmp_send (Vmp *thee, int des, char *buf, int bufsize) │ │ │ │ │ -  An MPI blocking send. │ │ │ │ │ - │ │ │ │ │ -  │ │ │ │ │ - int Vmp_recv (Vmp *thee, int src, char *buf, int bufsize) │ │ │ │ │ -  An MPI blocking receive. │ │ │ │ │ - │ │ │ │ │ + int Vcom_barr (Vcom *thee) │ │ │ │ │ +  Synchronization barrier. │ │ │ │ │   │ │ │ │ │ ***** Detailed Description ***** │ │ │ │ │ -Class Vmp: a Virtual MPI communication layer object. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ +Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ │ + Authors │ │ │ │ │ + Nathan Baker and Michael Holst │ │ │ │ │ Note │ │ │ │ │ None │ │ │ │ │ Version │ │ │ │ │ Id │ │ │ │ │ - vmp.h,v 1.22 2010/08/12 05:40:23 fetk Exp │ │ │ │ │ + vcom.h,v 1.38 2010/08/12 05:40:23 fetk Exp │ │ │ │ │ Attention │ │ │ │ │ * │ │ │ │ │ * MALOC = < Minimal Abstraction Layer for Object-oriented C > │ │ │ │ │ * Copyright (C) 1994-- Michael Holst │ │ │ │ │ * │ │ │ │ │ * This library is free software; you can redistribute it and/or │ │ │ │ │ * modify it under the terms of the GNU Lesser General Public │ │ │ │ │ @@ -83,10 +116,14 @@ │ │ │ │ │ * Lesser General Public License for more details. │ │ │ │ │ * │ │ │ │ │ * You should have received a copy of the GNU Lesser General Public │ │ │ │ │ * License along with this library; if not, write to the Free Software │ │ │ │ │ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA │ │ │ │ │ * │ │ │ │ │ * │ │ │ │ │ +***** Macro Definition Documentation ***** │ │ │ │ │ +***** ◆ VCOM_MPI_TAG ***** │ │ │ │ │ +#define VCOM_MPI_TAG   111 │ │ │ │ │ +A base value for MPI tags. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00011_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vmp.h Source File │ │ │ │ +MALOC: vcom.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -44,89 +44,114 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
vmp.h
│ │ │ │ +
vcom.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1
│ │ │ │ -
37#ifndef _VMP_H_
│ │ │ │ -
38#define _VMP_H_
│ │ │ │ -
39
│ │ │ │ -
40#include <maloc/maloc_base.h>
│ │ │ │ -
41
│ │ │ │ -
42#include <maloc/vsys.h>
│ │ │ │ -
43#include <maloc/vmpi.h>
│ │ │ │ -
44#include <maloc/vcom.h>
│ │ │ │ -
45
│ │ │ │ -
46/*
│ │ │ │ -
47 * ***************************************************************************
│ │ │ │ -
48 * Class Vmp: Parameters and datatypes
│ │ │ │ +
38#ifndef _VCOM_H_
│ │ │ │ +
39#define _VCOM_H_
│ │ │ │ +
40
│ │ │ │ +
41#include <maloc/maloc_base.h>
│ │ │ │ +
42
│ │ │ │ +
43#include <maloc/vsys.h>
│ │ │ │ +
44
│ │ │ │ +
46#define VCOM_MPI_TAG 111
│ │ │ │ +
47
│ │ │ │ +
48/*
│ │ │ │
49 * ***************************************************************************
│ │ │ │ -
50 */
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ -
58struct sVmp {
│ │ │ │ - │ │ │ │ - │ │ │ │ -
61};
│ │ │ │ +
50 * Class Vcom: Parameters and datatypes
│ │ │ │ +
51 * ***************************************************************************
│ │ │ │ +
52 */
│ │ │ │ +
53
│ │ │ │ +
│ │ │ │ +
60struct sVcom {
│ │ │ │ +
61
│ │ │ │ + │ │ │ │ + │ │ │ │ +
66
│ │ │ │ +
71 int type;
│ │ │ │ +
73 int error;
│ │ │ │ +
75 void *core;
│ │ │ │ +
76
│ │ │ │ +
77};
│ │ │ │
│ │ │ │ -
62
│ │ │ │ -
68typedef struct sVmp Vmp;
│ │ │ │ -
69
│ │ │ │ -
70/*
│ │ │ │ -
71 * ***************************************************************************
│ │ │ │ -
72 * Class Vmp: Inlineable methods (vmp.c)
│ │ │ │ -
73 * ***************************************************************************
│ │ │ │ -
74 */
│ │ │ │ -
75
│ │ │ │ -
76#if !defined(VINLINE_MALOC)
│ │ │ │ -
77#else /* if defined(VINLINE_MALOC) */
│ │ │ │ -
78#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ -
79
│ │ │ │ -
80
│ │ │ │ -
90int Vmp_init(int *argc, char ***argv);
│ │ │ │ -
91
│ │ │ │ -
99int Vmp_finalize(void);
│ │ │ │ -
100
│ │ │ │ - │ │ │ │ -
109
│ │ │ │ -
118void Vmp_dtor(Vmp **thee);
│ │ │ │ -
119
│ │ │ │ -
128int Vmp_rank(Vmp *thee);
│ │ │ │ -
129
│ │ │ │ -
138int Vmp_size(Vmp *thee);
│ │ │ │ -
139
│ │ │ │ -
148int Vmp_barr(Vmp *thee);
│ │ │ │ -
149
│ │ │ │ -
161int Vmp_send(Vmp *thee, int des, char *buf, int bufsize);
│ │ │ │ +
78
│ │ │ │ +
85typedef struct sVcom Vcom;
│ │ │ │ +
86
│ │ │ │ +
87/*
│ │ │ │ +
88 * ***************************************************************************
│ │ │ │ +
89 * Class Vcom: Inlineable methods (vcom.c)
│ │ │ │ +
90 * ***************************************************************************
│ │ │ │ +
91 */
│ │ │ │ +
92
│ │ │ │ +
93#if !defined(VINLINE_MALOC)
│ │ │ │ +
94#else /* if defined(VINLINE_MALOC) */
│ │ │ │ +
95#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ +
96
│ │ │ │ +
97
│ │ │ │ +
107int Vcom_init(int *argc, char ***argv);
│ │ │ │ +
108
│ │ │ │ + │ │ │ │ +
117
│ │ │ │ +
127Vcom* Vcom_ctor(int commtype);
│ │ │ │ +
128
│ │ │ │ +
140int Vcom_ctor2(Vcom* thee, int commtype);
│ │ │ │ +
141
│ │ │ │ +
150void Vcom_dtor(Vcom **thee);
│ │ │ │ +
151
│ │ │ │ +
161void Vcom_dtor2(Vcom *thee);
│ │ │ │
162
│ │ │ │ -
174int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize);
│ │ │ │ -
175
│ │ │ │ -
176#endif /* _VMP_H_ */
│ │ │ │ -
177
│ │ │ │ +
177int Vcom_send(Vcom *thee, int des, void *buf, int len, int type,
│ │ │ │ +
178 int block);
│ │ │ │ +
179
│ │ │ │ +
197int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type,
│ │ │ │ +
198 int block);
│ │ │ │ +
199
│ │ │ │ +
214int Vcom_getCount(Vcom *thee, int src, int *length, int type);
│ │ │ │ +
215
│ │ │ │ +
237int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length,
│ │ │ │ +
238 int type, int op);
│ │ │ │ +
239
│ │ │ │ +
248int Vcom_size(Vcom *thee);
│ │ │ │ +
249
│ │ │ │ +
261int Vcom_resize(Vcom *thee, int newsize);
│ │ │ │ +
262
│ │ │ │ +
271int Vcom_rank(Vcom *thee);
│ │ │ │ +
272
│ │ │ │ +
281int Vcom_barr(Vcom *thee);
│ │ │ │ +
282
│ │ │ │ +
283#endif /* _VCOM_H_ */
│ │ │ │ +
284
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │ -
Class Vmpi: a Virtual MPI communication layer object.
│ │ │ │ -
Class Vcom: virtual (currently just MPI) communications layer.
│ │ │ │
The primary header for VSYS. (Virtual SYStem utilities library.)
│ │ │ │ -
int Vmp_finalize(void)
The Vmp finalizer.
│ │ │ │ -
int Vmp_send(Vmp *thee, int des, char *buf, int bufsize)
An MPI blocking send.
│ │ │ │ -
int Vmp_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ -
int Vmp_rank(Vmp *thee)
Return my processor ID.
│ │ │ │ -
int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize)
An MPI blocking receive.
│ │ │ │ -
Vmp * Vmp_ctor(void)
The Vmp constructor.
│ │ │ │ -
void Vmp_dtor(Vmp **thee)
The Vmp destructor.
│ │ │ │ -
int Vmp_barr(Vmp *thee)
An MPI barrier.
│ │ │ │ -
int Vmp_size(Vmp *thee)
Return the number of processors involved.
│ │ │ │ -
Contains public data members for Vmp class.
Definition vmp.h:58
│ │ │ │ -
int mpi_rank
Definition vmp.h:59
│ │ │ │ -
int mpi_size
Definition vmp.h:60
│ │ │ │ +
int Vcom_rank(Vcom *thee)
Get the ID of the local PE
│ │ │ │ +
int Vcom_resize(Vcom *thee, int newsize)
Resize (shrink) the communications group to include only newsize number of processors....
│ │ │ │ +
int Vcom_ctor2(Vcom *thee, int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI....
│ │ │ │ +
int Vcom_size(Vcom *thee)
Get the number of PEs in communicator.
│ │ │ │ +
int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, int op)
Perform a reduction of the data across all processors. This is equivalent (and in the case of MPI is ...
│ │ │ │ +
Vcom * Vcom_ctor(int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI.
│ │ │ │ +
int Vcom_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ +
int Vcom_finalize(void)
The Vmp finalizer.
│ │ │ │ +
int Vcom_barr(Vcom *thee)
Synchronization barrier.
│ │ │ │ +
void Vcom_dtor(Vcom **thee)
Destroy the communications object.
│ │ │ │ +
int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, int block)
Receive a (character) buffer. The blocking flag is present, but not used. All receives are assumed ...
│ │ │ │ +
int Vcom_getCount(Vcom *thee, int src, int *length, int type)
Perform a blocking probe to get the length (in number of items of specified type) of an incoming mess...
│ │ │ │ +
int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block)
Send a buffer. Returns 1 on success.
│ │ │ │ +
void Vcom_dtor2(Vcom *thee)
Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
│ │ │ │ +
Contains public data members for Vcom class.
Definition vcom.h:60
│ │ │ │ +
int type
Communication type. 0 = not initialized 1 = Message Passing Interface 1.1.
Definition vcom.h:71
│ │ │ │ +
int error
note if any error has occurred on this vcom device
Definition vcom.h:73
│ │ │ │ +
int mpi_size
Total number of PEs in this communicator from MPI.
Definition vcom.h:65
│ │ │ │ +
void * core
Private MPI core.
Definition vcom.h:75
│ │ │ │ +
int mpi_rank
Local PE rank from MPI.
Definition vcom.h:63
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,114 +3,166 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * psh │ │ │ │ │ * maloc │ │ │ │ │ -vmp.h │ │ │ │ │ +vcom.h │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ 1 │ │ │ │ │ - 37#ifndef _VMP_H_ │ │ │ │ │ - 38#define _VMP_H_ │ │ │ │ │ - 39 │ │ │ │ │ - 40#include │ │ │ │ │ - 41 │ │ │ │ │ - 42#include │ │ │ │ │ - 43#include │ │ │ │ │ - 44#include │ │ │ │ │ - 45 │ │ │ │ │ - 46/* │ │ │ │ │ - 47 * │ │ │ │ │ -*************************************************************************** │ │ │ │ │ - 48 * Class Vmp: Parameters and datatypes │ │ │ │ │ + 38#ifndef _VCOM_H_ │ │ │ │ │ + 39#define _VCOM_H_ │ │ │ │ │ + 40 │ │ │ │ │ + 41#include │ │ │ │ │ + 42 │ │ │ │ │ + 43#include │ │ │ │ │ + 44 │ │ │ │ │ +46#define VCOM_MPI_TAG 111 │ │ │ │ │ + 47 │ │ │ │ │ + 48/* │ │ │ │ │ 49 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 50 */ │ │ │ │ │ - 51 │ │ │ │ │ -58struct sVmp { │ │ │ │ │ -59 int mpi_rank; │ │ │ │ │ -60 int mpi_size; │ │ │ │ │ - 61}; │ │ │ │ │ - 62 │ │ │ │ │ -68typedef struct sVmp Vmp; │ │ │ │ │ - 69 │ │ │ │ │ - 70/* │ │ │ │ │ - 71 * │ │ │ │ │ + 50 * Class Vcom: Parameters and datatypes │ │ │ │ │ + 51 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 72 * Class Vmp: Inlineable methods (vmp.c) │ │ │ │ │ - 73 * │ │ │ │ │ + 52 */ │ │ │ │ │ + 53 │ │ │ │ │ +60struct sVcom { │ │ │ │ │ + 61 │ │ │ │ │ +63 int mpi_rank; │ │ │ │ │ +65 int mpi_size; │ │ │ │ │ + 66 │ │ │ │ │ +71 int type; │ │ │ │ │ +73 int error; │ │ │ │ │ +75 void *core; │ │ │ │ │ + 76 │ │ │ │ │ + 77}; │ │ │ │ │ + 78 │ │ │ │ │ +85typedef struct sVcom Vcom; │ │ │ │ │ + 86 │ │ │ │ │ + 87/* │ │ │ │ │ + 88 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 74 */ │ │ │ │ │ - 75 │ │ │ │ │ - 76#if !defined(VINLINE_MALOC) │ │ │ │ │ - 77#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ - 78#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ - 79 │ │ │ │ │ - 80 │ │ │ │ │ -90int Vmp_init(int *argc, char ***argv); │ │ │ │ │ - 91 │ │ │ │ │ -99int Vmp_finalize(void); │ │ │ │ │ - 100 │ │ │ │ │ -108Vmp* Vmp_ctor(void); │ │ │ │ │ - 109 │ │ │ │ │ -118void Vmp_dtor(Vmp **thee); │ │ │ │ │ - 119 │ │ │ │ │ -128int Vmp_rank(Vmp *thee); │ │ │ │ │ - 129 │ │ │ │ │ -138int Vmp_size(Vmp *thee); │ │ │ │ │ - 139 │ │ │ │ │ -148int Vmp_barr(Vmp *thee); │ │ │ │ │ - 149 │ │ │ │ │ -161int Vmp_send(Vmp *thee, int des, char *buf, int bufsize); │ │ │ │ │ + 89 * Class Vcom: Inlineable methods (vcom.c) │ │ │ │ │ + 90 * │ │ │ │ │ +*************************************************************************** │ │ │ │ │ + 91 */ │ │ │ │ │ + 92 │ │ │ │ │ + 93#if !defined(VINLINE_MALOC) │ │ │ │ │ + 94#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ + 95#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ + 96 │ │ │ │ │ + 97 │ │ │ │ │ +107int Vcom_init(int *argc, char ***argv); │ │ │ │ │ + 108 │ │ │ │ │ +116int Vcom_finalize(void); │ │ │ │ │ + 117 │ │ │ │ │ +127Vcom* Vcom_ctor(int commtype); │ │ │ │ │ + 128 │ │ │ │ │ +140int Vcom_ctor2(Vcom* thee, int commtype); │ │ │ │ │ + 141 │ │ │ │ │ +150void Vcom_dtor(Vcom **thee); │ │ │ │ │ + 151 │ │ │ │ │ +161void Vcom_dtor2(Vcom *thee); │ │ │ │ │ 162 │ │ │ │ │ -174int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize); │ │ │ │ │ - 175 │ │ │ │ │ - 176#endif /* _VMP_H_ */ │ │ │ │ │ - 177 │ │ │ │ │ +177int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, │ │ │ │ │ + 178 int block); │ │ │ │ │ + 179 │ │ │ │ │ +197int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, │ │ │ │ │ + 198 int block); │ │ │ │ │ + 199 │ │ │ │ │ +214int Vcom_getCount(Vcom *thee, int src, int *length, int type); │ │ │ │ │ + 215 │ │ │ │ │ +237int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, │ │ │ │ │ + 238 int type, int op); │ │ │ │ │ + 239 │ │ │ │ │ +248int Vcom_size(Vcom *thee); │ │ │ │ │ + 249 │ │ │ │ │ +261int Vcom_resize(Vcom *thee, int newsize); │ │ │ │ │ + 262 │ │ │ │ │ +271int Vcom_rank(Vcom *thee); │ │ │ │ │ + 272 │ │ │ │ │ +281int Vcom_barr(Vcom *thee); │ │ │ │ │ + 282 │ │ │ │ │ + 283#endif /* _VCOM_H_ */ │ │ │ │ │ + 284 │ │ │ │ │ maloc_base.h │ │ │ │ │ The base (or foundation) header for MALOC. │ │ │ │ │ -vmpi.h │ │ │ │ │ -Class Vmpi: a Virtual MPI communication layer object. │ │ │ │ │ -vcom.h │ │ │ │ │ -Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ │ vsys.h │ │ │ │ │ The primary header for VSYS. (Virtual SYStem utilities library.) │ │ │ │ │ -Vmp_finalize │ │ │ │ │ -int Vmp_finalize(void) │ │ │ │ │ -The Vmp finalizer. │ │ │ │ │ -Vmp_send │ │ │ │ │ -int Vmp_send(Vmp *thee, int des, char *buf, int bufsize) │ │ │ │ │ -An MPI blocking send. │ │ │ │ │ -Vmp_init │ │ │ │ │ -int Vmp_init(int *argc, char ***argv) │ │ │ │ │ +Vcom_rank │ │ │ │ │ +int Vcom_rank(Vcom *thee) │ │ │ │ │ +Get the ID of the local PE │ │ │ │ │ +Vcom_resize │ │ │ │ │ +int Vcom_resize(Vcom *thee, int newsize) │ │ │ │ │ +Resize (shrink) the communications group to include only newsize number of │ │ │ │ │ +processors.... │ │ │ │ │ +Vcom_ctor2 │ │ │ │ │ +int Vcom_ctor2(Vcom *thee, int commtype) │ │ │ │ │ +Construct the communications object. This routine sets up data members of class │ │ │ │ │ +and initializes MPI.... │ │ │ │ │ +Vcom_size │ │ │ │ │ +int Vcom_size(Vcom *thee) │ │ │ │ │ +Get the number of PEs in communicator. │ │ │ │ │ +Vcom_reduce │ │ │ │ │ +int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, │ │ │ │ │ +int op) │ │ │ │ │ +Perform a reduction of the data across all processors. This is equivalent (and │ │ │ │ │ +in the case of MPI is ... │ │ │ │ │ +Vcom_ctor │ │ │ │ │ +Vcom * Vcom_ctor(int commtype) │ │ │ │ │ +Construct the communications object. This routine sets up data members of class │ │ │ │ │ +and initializes MPI. │ │ │ │ │ +Vcom_init │ │ │ │ │ +int Vcom_init(int *argc, char ***argv) │ │ │ │ │ The Vmp initializer. │ │ │ │ │ -Vmp_rank │ │ │ │ │ -int Vmp_rank(Vmp *thee) │ │ │ │ │ -Return my processor ID. │ │ │ │ │ -Vmp_recv │ │ │ │ │ -int Vmp_recv(Vmp *thee, int src, char *buf, int bufsize) │ │ │ │ │ -An MPI blocking receive. │ │ │ │ │ -Vmp_ctor │ │ │ │ │ -Vmp * Vmp_ctor(void) │ │ │ │ │ -The Vmp constructor. │ │ │ │ │ -Vmp_dtor │ │ │ │ │ -void Vmp_dtor(Vmp **thee) │ │ │ │ │ -The Vmp destructor. │ │ │ │ │ -Vmp_barr │ │ │ │ │ -int Vmp_barr(Vmp *thee) │ │ │ │ │ -An MPI barrier. │ │ │ │ │ -Vmp_size │ │ │ │ │ -int Vmp_size(Vmp *thee) │ │ │ │ │ -Return the number of processors involved. │ │ │ │ │ -sVmp │ │ │ │ │ -Contains public data members for Vmp class. │ │ │ │ │ -Definition vmp.h:58 │ │ │ │ │ -sVmp::mpi_rank │ │ │ │ │ -int mpi_rank │ │ │ │ │ -Definition vmp.h:59 │ │ │ │ │ -sVmp::mpi_size │ │ │ │ │ +Vcom_finalize │ │ │ │ │ +int Vcom_finalize(void) │ │ │ │ │ +The Vmp finalizer. │ │ │ │ │ +Vcom_barr │ │ │ │ │ +int Vcom_barr(Vcom *thee) │ │ │ │ │ +Synchronization barrier. │ │ │ │ │ +Vcom_dtor │ │ │ │ │ +void Vcom_dtor(Vcom **thee) │ │ │ │ │ +Destroy the communications object. │ │ │ │ │ +Vcom_recv │ │ │ │ │ +int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, int block) │ │ │ │ │ +Receive a (character) buffer. The blocking flag is present, but not used. All │ │ │ │ │ +receives are assumed ... │ │ │ │ │ +Vcom_getCount │ │ │ │ │ +int Vcom_getCount(Vcom *thee, int src, int *length, int type) │ │ │ │ │ +Perform a blocking probe to get the length (in number of items of specified │ │ │ │ │ +type) of an incoming mess... │ │ │ │ │ +Vcom_send │ │ │ │ │ +int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block) │ │ │ │ │ +Send a buffer. Returns 1 on success. │ │ │ │ │ +Vcom_dtor2 │ │ │ │ │ +void Vcom_dtor2(Vcom *thee) │ │ │ │ │ +Destroy the communications object. This is broken into two parts to be callable │ │ │ │ │ +from FORTRAN. │ │ │ │ │ +sVcom │ │ │ │ │ +Contains public data members for Vcom class. │ │ │ │ │ +Definition vcom.h:60 │ │ │ │ │ +sVcom::type │ │ │ │ │ +int type │ │ │ │ │ +Communication type. 0 = not initialized 1 = Message Passing Interface 1.1. │ │ │ │ │ +Definition vcom.h:71 │ │ │ │ │ +sVcom::error │ │ │ │ │ +int error │ │ │ │ │ +note if any error has occurred on this vcom device │ │ │ │ │ +Definition vcom.h:73 │ │ │ │ │ +sVcom::mpi_size │ │ │ │ │ int mpi_size │ │ │ │ │ -Definition vmp.h:60 │ │ │ │ │ +Total number of PEs in this communicator from MPI. │ │ │ │ │ +Definition vcom.h:65 │ │ │ │ │ +sVcom::core │ │ │ │ │ +void * core │ │ │ │ │ +Private MPI core. │ │ │ │ │ +Definition vcom.h:75 │ │ │ │ │ +sVcom::mpi_rank │ │ │ │ │ +int mpi_rank │ │ │ │ │ +Local PE rank from MPI. │ │ │ │ │ +Definition vcom.h:63 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00012.dot.gz │ │ │ │ ├── a00012.dot │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ -digraph "vmp.h" │ │ │ │ │ +digraph "vcom.h" │ │ │ │ │ { │ │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ │ bgcolor="transparent"; │ │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ │ - Node1 [id="Node000001",label="vmp.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ │ + Node1 [id="Node000001",label="vcom.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc/maloc_base.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00002.html",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="assert.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node4 [id="Node000004",label="ctype.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ @@ -37,33 +37,25 @@ │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 [id="Node000018",label="maloc/vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ │ Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node19 [id="edge19_Node000018_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node20 [id="edge21_Node000018_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node20 [id="Node000020",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ Node20 -> Node2 [id="edge22_Node000020_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node21 [id="edge23_Node000018_Node000021",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ + Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ Node21 -> Node2 [id="edge24_Node000021_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node21 -> Node19 [id="edge25_Node000021_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node22 [id="edge26_Node000018_Node000022",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node22 -> Node2 [id="edge27_Node000022_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node19 [id="edge28_Node000022_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node20 [id="edge29_Node000022_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node23 [id="edge30_Node000018_Node000023",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ + Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ Node23 -> Node2 [id="edge31_Node000023_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node1 -> Node24 [id="edge32_Node000001_Node000024",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node24 [id="Node000024",label="maloc/vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ - Node24 -> Node2 [id="edge33_Node000024_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node24 -> Node18 [id="edge34_Node000024_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node1 -> Node25 [id="edge35_Node000001_Node000025",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node25 [id="Node000025",label="maloc/vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ - Node25 -> Node2 [id="edge36_Node000025_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node25 -> Node18 [id="edge37_Node000025_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00013.dot │ │ │ │ @@ -1,12 +1,14 @@ │ │ │ │ -digraph "vmp.h" │ │ │ │ +digraph "vcom.h" │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ - Node1 [id="Node000001",label="vmp.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node1 [id="Node000001",label="vcom.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ + Node2 [id="Node000002",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 [id="Node000003",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ + Node3 [id="Node000003",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ + Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00014.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vcom.h File Reference │ │ │ │ +MALOC: vmpi.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -41,113 +41,97 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ Classes | │ │ │ │ -Macros | │ │ │ │ Typedefs | │ │ │ │ Functions
│ │ │ │ -
vcom.h File Reference
│ │ │ │ +
vmpi.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ +

Class Vmpi: a Virtual MPI communication layer object. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ #include <maloc/vsys.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vcom.h:
│ │ │ │ +Include dependency graph for vmpi.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │

│ │ │ │ Classes

struct  sVcom
 Contains public data members for Vcom class. More...
struct  sVmpi
 Class Vmpi: Definition. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Macros

#define VCOM_MPI_TAG   111
 A base value for MPI tags.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Typedefs

typedef struct sVcom Vcom
 Declaration of the Vcom class as the Vcom structure
│ │ │ │ -
 
typedef struct sVmpi Vmpi
 Declaration of the Vmpi class as the Vmpi structure.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

int Vcom_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vcom_finalize (void)
 The Vmp finalizer.
 
VcomVcom_ctor (int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI.
 
int Vcom_ctor2 (Vcom *thee, int commtype)
 Construct the communications object. This routine sets up data members of class and initializes MPI. This is broken into two parts to be callable from FORTRAN.
 
void Vcom_dtor (Vcom **thee)
 Destroy the communications object.
 
void Vcom_dtor2 (Vcom *thee)
 Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
 
int Vcom_send (Vcom *thee, int des, void *buf, int len, int type, int block)
 Send a buffer. Returns 1 on success.
 
int Vcom_recv (Vcom *thee, int src, void *buf, int len, int type, int block)
 Receive a (character) buffer.
│ │ │ │ - The blocking flag is present, but not used. All receives are assumed to be blocking. A non-blocking receive would be very ugly to implement (signals or something?).
 
int Vcom_getCount (Vcom *thee, int src, int *length, int type)
 Perform a blocking probe to get the length (in number of items of specified type) of an incoming message and place it in the
│ │ │ │ - argument ``length".
 
int Vcom_reduce (Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, int op)
 Perform a reduction of the data across all processors. This is equivalent (and in the case of MPI is identical to) MPI_Allreduce. Basically, the specified operations are appleed to each member of
│ │ │ │ - the sendbuf across all processors and the results are written to recvbuf.
 
int Vcom_size (Vcom *thee)
 Get the number of PEs in communicator.
 
int Vcom_resize (Vcom *thee, int newsize)
 Resize (shrink) the communications group to include only newsize number of processors.
│ │ │ │ - Obsolete processes are given rank of -1 and size of 0.
 
int Vcom_rank (Vcom *thee)
 Get the ID of the local PE
│ │ │ │ +
int Vmpi_init (int *argc, char ***argv)
 The Vmp initializer.
 
int Vmpi_finalize (void)
 The Vmp finalizer.
 
VmpiVmpi_ctor (void)
 The Vmpi constructor.
 
void Vmpi_dtor (Vmpi **thee)
 The Vmpi destructor.
 
int Vmpi_rank (Vmpi *thee)
 Return my processor ID.
│ │ │ │ +
 
int Vmpi_size (Vmpi *thee)
 Return the number of processors involved.
 
int Vmpi_barr (Vmpi *thee)
 An MPI barrier.
│ │ │ │
 
int Vcom_barr (Vcom *thee)
 Synchronization barrier.
 
 
int Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI blocking send.
 
int Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize)
 An MPI blocking receive.
 
int Vmpi_bcast (Vmpi *thee, char *buf, int bufsize)
 An MPI broadcast.
 
int Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
 An MPI reduce.
│ │ │ │ +
 
int Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize)
 An MPI non-blocking send.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Class Vcom: virtual (currently just MPI) communications layer.

│ │ │ │ -
Authors
Nathan Baker and Michael Holst
│ │ │ │ +

Class Vmpi: a Virtual MPI communication layer object.

│ │ │ │ +
Author
Michael Holst
│ │ │ │
Note
None
│ │ │ │
Version
│ │ │ │ -
Id
vcom.h,v 1.38 2010/08/12 05:40:23 fetk Exp
│ │ │ │ +
Id
vmpi.h,v 1.29 2010/08/12 05:40:23 fetk Exp
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │  * License as published by the Free Software Foundation; either
│ │ │ │ @@ -159,31 +143,14 @@
│ │ │ │  * Lesser General Public License for more details.
│ │ │ │  *
│ │ │ │  * You should have received a copy of the GNU Lesser General Public
│ │ │ │  * License along with this library; if not, write to the Free Software
│ │ │ │  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
│ │ │ │  * 
│ │ │ │  *  
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ VCOM_MPI_TAG

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define VCOM_MPI_TAG   111
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

A base value for MPI tags.

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,107 +3,80 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * psh │ │ │ │ │ * maloc │ │ │ │ │ -Classes | Macros | Typedefs | Functions │ │ │ │ │ -vcom.h File Reference │ │ │ │ │ -Vcom_class │ │ │ │ │ -Class Vcom: virtual (currently just MPI) communications layer. More... │ │ │ │ │ +Classes | Typedefs | Functions │ │ │ │ │ +vmpi.h File Reference │ │ │ │ │ +Vmpi_class │ │ │ │ │ +Class Vmpi: a Virtual MPI communication layer object. More... │ │ │ │ │ #include │ │ │ │ │ #include │ │ │ │ │ -Include dependency graph for vcom.h: │ │ │ │ │ +Include dependency graph for vmpi.h: │ │ │ │ │ This graph shows which files directly or indirectly include this file: │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ Classes │ │ │ │ │ -struct  sVcom │ │ │ │ │ -  Contains public data members for Vcom class. More... │ │ │ │ │ -  │ │ │ │ │ - Macros │ │ │ │ │ -#define VCOM_MPI_TAG   111 │ │ │ │ │ -  A base value for MPI tags. │ │ │ │ │ +struct  sVmpi │ │ │ │ │ +  Class Vmpi: Definition. More... │ │ │ │ │   │ │ │ │ │ Typedefs │ │ │ │ │ -typedef struct sVcom Vcom │ │ │ │ │ -  Declaration of the Vcom class as the Vcom structure │ │ │ │ │ - │ │ │ │ │ +typedef struct sVmpi Vmpi │ │ │ │ │ +  Declaration of the Vmpi class as the Vmpi structure. │ │ │ │ │   │ │ │ │ │ Functions │ │ │ │ │ - int Vcom_init (int *argc, char ***argv) │ │ │ │ │ + int Vmpi_init (int *argc, char ***argv) │ │ │ │ │   The Vmp initializer. │ │ │ │ │   │ │ │ │ │ - int Vcom_finalize (void) │ │ │ │ │ + int Vmpi_finalize (void) │ │ │ │ │   The Vmp finalizer. │ │ │ │ │   │ │ │ │ │ -Vcom * Vcom_ctor (int commtype) │ │ │ │ │ -  Construct the communications object. This routine sets up data members │ │ │ │ │ - of class and initializes MPI. │ │ │ │ │ -  │ │ │ │ │ - int Vcom_ctor2 (Vcom *thee, int commtype) │ │ │ │ │ - Construct the communications object. This routine sets up data members │ │ │ │ │ -  of class and initializes MPI. This is broken into two parts to be │ │ │ │ │ - callable from FORTRAN. │ │ │ │ │ -  │ │ │ │ │ - void Vcom_dtor (Vcom **thee) │ │ │ │ │ -  Destroy the communications object. │ │ │ │ │ -  │ │ │ │ │ - void Vcom_dtor2 (Vcom *thee) │ │ │ │ │ -  Destroy the communications object. This is broken into two parts to be │ │ │ │ │ - callable from FORTRAN. │ │ │ │ │ -  │ │ │ │ │ - int Vcom_send (Vcom *thee, int des, void *buf, int len, int type, int │ │ │ │ │ - block) │ │ │ │ │ -  Send a buffer. Returns 1 on success. │ │ │ │ │ -  │ │ │ │ │ - int Vcom_recv (Vcom *thee, int src, void *buf, int len, int type, int │ │ │ │ │ - block) │ │ │ │ │ - Receive a (character) buffer. │ │ │ │ │ -  The blocking flag is present, but not used. All receives are assumed to │ │ │ │ │ - be blocking. A non-blocking receive would be very ugly to implement │ │ │ │ │ - (signals or something?). │ │ │ │ │ -  │ │ │ │ │ - int Vcom_getCount (Vcom *thee, int src, int *length, int type) │ │ │ │ │ - Perform a blocking probe to get the length (in number of items of │ │ │ │ │ -  specified type) of an incoming message and place it in the │ │ │ │ │ - argument ``length". │ │ │ │ │ -  │ │ │ │ │ - int Vcom_reduce (Vcom *thee, void *sendbuf, void *recvbuf, int length, int │ │ │ │ │ - type, int op) │ │ │ │ │ - Perform a reduction of the data across all processors. This is │ │ │ │ │ - equivalent (and in the case of MPI is identical to) MPI_Allreduce. │ │ │ │ │ -  Basically, the specified operations are appleed to each member of │ │ │ │ │ - the sendbuf across all processors and the results are written to │ │ │ │ │ - recvbuf. │ │ │ │ │ -  │ │ │ │ │ - int Vcom_size (Vcom *thee) │ │ │ │ │ -  Get the number of PEs in communicator. │ │ │ │ │ -  │ │ │ │ │ - int Vcom_resize (Vcom *thee, int newsize) │ │ │ │ │ - Resize (shrink) the communications group to include only newsize number │ │ │ │ │ -  of processors. │ │ │ │ │ - Obsolete processes are given rank of -1 and size of 0. │ │ │ │ │ +Vmpi * Vmpi_ctor (void) │ │ │ │ │ +  The Vmpi constructor. │ │ │ │ │ +  │ │ │ │ │ + void Vmpi_dtor (Vmpi **thee) │ │ │ │ │ +  The Vmpi destructor. │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_rank (Vmpi *thee) │ │ │ │ │ +  Return my processor ID. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_size (Vmpi *thee) │ │ │ │ │ +  Return the number of processors involved. │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_barr (Vmpi *thee) │ │ │ │ │ +  An MPI barrier. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_send (Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ +  An MPI blocking send. │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_recv (Vmpi *thee, int src, char *buf, int bufsize) │ │ │ │ │ +  An MPI blocking receive. │ │ │ │ │ +  │ │ │ │ │ + int Vmpi_bcast (Vmpi *thee, char *buf, int bufsize) │ │ │ │ │ +  An MPI broadcast. │ │ │ │ │   │ │ │ │ │ - int Vcom_rank (Vcom *thee) │ │ │ │ │ -  Get the ID of the local PE │ │ │ │ │ + int Vmpi_reduce (Vmpi *thee, char *sbuf, char *rbuf, int bufsize) │ │ │ │ │ +  An MPI reduce. │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ - int Vcom_barr (Vcom *thee) │ │ │ │ │ -  Synchronization barrier. │ │ │ │ │ + int Vmpi_isend (Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ +  An MPI non-blocking send. │ │ │ │ │   │ │ │ │ │ ***** Detailed Description ***** │ │ │ │ │ -Class Vcom: virtual (currently just MPI) communications layer. │ │ │ │ │ - Authors │ │ │ │ │ - Nathan Baker and Michael Holst │ │ │ │ │ +Class Vmpi: a Virtual MPI communication layer object. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ Note │ │ │ │ │ None │ │ │ │ │ Version │ │ │ │ │ Id │ │ │ │ │ - vcom.h,v 1.38 2010/08/12 05:40:23 fetk Exp │ │ │ │ │ + vmpi.h,v 1.29 2010/08/12 05:40:23 fetk Exp │ │ │ │ │ Attention │ │ │ │ │ * │ │ │ │ │ * MALOC = < Minimal Abstraction Layer for Object-oriented C > │ │ │ │ │ * Copyright (C) 1994-- Michael Holst │ │ │ │ │ * │ │ │ │ │ * This library is free software; you can redistribute it and/or │ │ │ │ │ * modify it under the terms of the GNU Lesser General Public │ │ │ │ │ @@ -116,14 +89,10 @@ │ │ │ │ │ * Lesser General Public License for more details. │ │ │ │ │ * │ │ │ │ │ * You should have received a copy of the GNU Lesser General Public │ │ │ │ │ * License along with this library; if not, write to the Free Software │ │ │ │ │ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA │ │ │ │ │ * │ │ │ │ │ * │ │ │ │ │ -***** Macro Definition Documentation ***** │ │ │ │ │ -***** ◆ VCOM_MPI_TAG ***** │ │ │ │ │ -#define VCOM_MPI_TAG   111 │ │ │ │ │ -A base value for MPI tags. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00014_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vcom.h Source File │ │ │ │ +MALOC: vmpi.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -44,114 +44,94 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
vcom.h
│ │ │ │ +
vmpi.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1
│ │ │ │ -
38#ifndef _VCOM_H_
│ │ │ │ -
39#define _VCOM_H_
│ │ │ │ +
38#ifndef _VMPI_H_
│ │ │ │ +
39#define _VMPI_H_
│ │ │ │
40
│ │ │ │
41#include <maloc/maloc_base.h>
│ │ │ │
42
│ │ │ │
43#include <maloc/vsys.h>
│ │ │ │
44
│ │ │ │ -
46#define VCOM_MPI_TAG 111
│ │ │ │ -
47
│ │ │ │ -
48/*
│ │ │ │ -
49 * ***************************************************************************
│ │ │ │ -
50 * Class Vcom: Parameters and datatypes
│ │ │ │ -
51 * ***************************************************************************
│ │ │ │ -
52 */
│ │ │ │ -
53
│ │ │ │ -
│ │ │ │ -
60struct sVcom {
│ │ │ │ -
61
│ │ │ │ - │ │ │ │ - │ │ │ │ -
66
│ │ │ │ -
71 int type;
│ │ │ │ -
73 int error;
│ │ │ │ -
75 void *core;
│ │ │ │ -
76
│ │ │ │ -
77};
│ │ │ │ +
45/*
│ │ │ │ +
46 * ***************************************************************************
│ │ │ │ +
47 * Class Vmpi: Parameters and datatypes
│ │ │ │ +
48 * ***************************************************************************
│ │ │ │ +
49 */
│ │ │ │ +
50
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
57struct sVmpi {
│ │ │ │ + │ │ │ │ + │ │ │ │ +
60};
│ │ │ │
│ │ │ │ +
61
│ │ │ │ +
67typedef struct sVmpi Vmpi;
│ │ │ │ +
68
│ │ │ │ +
69/*
│ │ │ │ +
70 * ***************************************************************************
│ │ │ │ +
71 * Class Vmpi: Inlineable methods (vmpi.c)
│ │ │ │ +
72 * ***************************************************************************
│ │ │ │ +
73 */
│ │ │ │ +
74
│ │ │ │ +
75#if !defined(VINLINE_MALOC)
│ │ │ │ +
76#else /* if defined(VINLINE_MALOC) */
│ │ │ │ +
77#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │
78
│ │ │ │ -
85typedef struct sVcom Vcom;
│ │ │ │ -
86
│ │ │ │ -
87/*
│ │ │ │ -
88 * ***************************************************************************
│ │ │ │ -
89 * Class Vcom: Inlineable methods (vcom.c)
│ │ │ │ -
90 * ***************************************************************************
│ │ │ │ -
91 */
│ │ │ │ -
92
│ │ │ │ -
93#if !defined(VINLINE_MALOC)
│ │ │ │ -
94#else /* if defined(VINLINE_MALOC) */
│ │ │ │ -
95#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ -
96
│ │ │ │ -
97
│ │ │ │ -
107int Vcom_init(int *argc, char ***argv);
│ │ │ │ -
108
│ │ │ │ - │ │ │ │ +
88int Vmpi_init(int *argc, char ***argv);
│ │ │ │ +
89
│ │ │ │ +
97int Vmpi_finalize(void);
│ │ │ │ +
98
│ │ │ │ + │ │ │ │ +
107
│ │ │ │ +
116void Vmpi_dtor(Vmpi **thee);
│ │ │ │
117
│ │ │ │ -
127Vcom* Vcom_ctor(int commtype);
│ │ │ │ -
128
│ │ │ │ -
140int Vcom_ctor2(Vcom* thee, int commtype);
│ │ │ │ -
141
│ │ │ │ -
150void Vcom_dtor(Vcom **thee);
│ │ │ │ -
151
│ │ │ │ -
161void Vcom_dtor2(Vcom *thee);
│ │ │ │ -
162
│ │ │ │ -
177int Vcom_send(Vcom *thee, int des, void *buf, int len, int type,
│ │ │ │ -
178 int block);
│ │ │ │ -
179
│ │ │ │ -
197int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type,
│ │ │ │ -
198 int block);
│ │ │ │ -
199
│ │ │ │ -
214int Vcom_getCount(Vcom *thee, int src, int *length, int type);
│ │ │ │ -
215
│ │ │ │ -
237int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length,
│ │ │ │ -
238 int type, int op);
│ │ │ │ -
239
│ │ │ │ -
248int Vcom_size(Vcom *thee);
│ │ │ │ -
249
│ │ │ │ -
261int Vcom_resize(Vcom *thee, int newsize);
│ │ │ │ -
262
│ │ │ │ -
271int Vcom_rank(Vcom *thee);
│ │ │ │ -
272
│ │ │ │ -
281int Vcom_barr(Vcom *thee);
│ │ │ │ -
282
│ │ │ │ -
283#endif /* _VCOM_H_ */
│ │ │ │ -
284
│ │ │ │ +
126int Vmpi_rank(Vmpi *thee);
│ │ │ │ +
127
│ │ │ │ +
136int Vmpi_size(Vmpi *thee);
│ │ │ │ +
137
│ │ │ │ +
146int Vmpi_barr(Vmpi *thee);
│ │ │ │ +
147
│ │ │ │ +
159int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize);
│ │ │ │ +
160
│ │ │ │ +
172int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize);
│ │ │ │ +
173
│ │ │ │ +
184int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize);
│ │ │ │ +
185
│ │ │ │ +
197int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize);
│ │ │ │ +
198
│ │ │ │ +
210int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize);
│ │ │ │ +
211
│ │ │ │ +
212#endif /* _VMPI_H_ */
│ │ │ │ +
213
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │
The primary header for VSYS. (Virtual SYStem utilities library.)
│ │ │ │ -
int Vcom_rank(Vcom *thee)
Get the ID of the local PE
│ │ │ │ -
int Vcom_resize(Vcom *thee, int newsize)
Resize (shrink) the communications group to include only newsize number of processors....
│ │ │ │ -
int Vcom_ctor2(Vcom *thee, int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI....
│ │ │ │ -
int Vcom_size(Vcom *thee)
Get the number of PEs in communicator.
│ │ │ │ -
int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, int op)
Perform a reduction of the data across all processors. This is equivalent (and in the case of MPI is ...
│ │ │ │ -
Vcom * Vcom_ctor(int commtype)
Construct the communications object. This routine sets up data members of class and initializes MPI.
│ │ │ │ -
int Vcom_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ -
int Vcom_finalize(void)
The Vmp finalizer.
│ │ │ │ -
int Vcom_barr(Vcom *thee)
Synchronization barrier.
│ │ │ │ -
void Vcom_dtor(Vcom **thee)
Destroy the communications object.
│ │ │ │ -
int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, int block)
Receive a (character) buffer. The blocking flag is present, but not used. All receives are assumed ...
│ │ │ │ -
int Vcom_getCount(Vcom *thee, int src, int *length, int type)
Perform a blocking probe to get the length (in number of items of specified type) of an incoming mess...
│ │ │ │ -
int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block)
Send a buffer. Returns 1 on success.
│ │ │ │ -
void Vcom_dtor2(Vcom *thee)
Destroy the communications object. This is broken into two parts to be callable from FORTRAN.
│ │ │ │ -
Contains public data members for Vcom class.
Definition vcom.h:60
│ │ │ │ -
int type
Communication type. 0 = not initialized 1 = Message Passing Interface 1.1.
Definition vcom.h:71
│ │ │ │ -
int error
note if any error has occurred on this vcom device
Definition vcom.h:73
│ │ │ │ -
int mpi_size
Total number of PEs in this communicator from MPI.
Definition vcom.h:65
│ │ │ │ -
void * core
Private MPI core.
Definition vcom.h:75
│ │ │ │ -
int mpi_rank
Local PE rank from MPI.
Definition vcom.h:63
│ │ │ │ +
int Vmpi_init(int *argc, char ***argv)
The Vmp initializer.
│ │ │ │ +
int Vmpi_finalize(void)
The Vmp finalizer.
│ │ │ │ +
int Vmpi_size(Vmpi *thee)
Return the number of processors involved.
│ │ │ │ +
int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize)
An MPI reduce.
│ │ │ │ +
int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize)
An MPI blocking receive.
│ │ │ │ +
int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize)
An MPI non-blocking send.
│ │ │ │ +
void Vmpi_dtor(Vmpi **thee)
The Vmpi destructor.
│ │ │ │ +
int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize)
An MPI blocking send.
│ │ │ │ +
Vmpi * Vmpi_ctor(void)
The Vmpi constructor.
│ │ │ │ +
int Vmpi_barr(Vmpi *thee)
An MPI barrier.
│ │ │ │ +
int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize)
An MPI broadcast.
│ │ │ │ +
int Vmpi_rank(Vmpi *thee)
Return my processor ID.
│ │ │ │ +
Class Vmpi: Definition.
Definition vmpi.h:57
│ │ │ │ +
int mpi_rank
Definition vmpi.h:58
│ │ │ │ +
int mpi_size
Definition vmpi.h:59
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,166 +3,123 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * psh │ │ │ │ │ * maloc │ │ │ │ │ -vcom.h │ │ │ │ │ +vmpi.h │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ 1 │ │ │ │ │ - 38#ifndef _VCOM_H_ │ │ │ │ │ - 39#define _VCOM_H_ │ │ │ │ │ + 38#ifndef _VMPI_H_ │ │ │ │ │ + 39#define _VMPI_H_ │ │ │ │ │ 40 │ │ │ │ │ 41#include │ │ │ │ │ 42 │ │ │ │ │ 43#include │ │ │ │ │ 44 │ │ │ │ │ -46#define VCOM_MPI_TAG 111 │ │ │ │ │ - 47 │ │ │ │ │ - 48/* │ │ │ │ │ - 49 * │ │ │ │ │ + 45/* │ │ │ │ │ + 46 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 50 * Class Vcom: Parameters and datatypes │ │ │ │ │ - 51 * │ │ │ │ │ + 47 * Class Vmpi: Parameters and datatypes │ │ │ │ │ + 48 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 52 */ │ │ │ │ │ - 53 │ │ │ │ │ -60struct sVcom { │ │ │ │ │ + 49 */ │ │ │ │ │ + 50 │ │ │ │ │ + 51 │ │ │ │ │ +57struct sVmpi { │ │ │ │ │ +58 int mpi_rank; │ │ │ │ │ +59 int mpi_size; │ │ │ │ │ + 60}; │ │ │ │ │ 61 │ │ │ │ │ -63 int mpi_rank; │ │ │ │ │ -65 int mpi_size; │ │ │ │ │ - 66 │ │ │ │ │ -71 int type; │ │ │ │ │ -73 int error; │ │ │ │ │ -75 void *core; │ │ │ │ │ - 76 │ │ │ │ │ - 77}; │ │ │ │ │ - 78 │ │ │ │ │ -85typedef struct sVcom Vcom; │ │ │ │ │ - 86 │ │ │ │ │ - 87/* │ │ │ │ │ - 88 * │ │ │ │ │ +67typedef struct sVmpi Vmpi; │ │ │ │ │ + 68 │ │ │ │ │ + 69/* │ │ │ │ │ + 70 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 89 * Class Vcom: Inlineable methods (vcom.c) │ │ │ │ │ - 90 * │ │ │ │ │ + 71 * Class Vmpi: Inlineable methods (vmpi.c) │ │ │ │ │ + 72 * │ │ │ │ │ *************************************************************************** │ │ │ │ │ - 91 */ │ │ │ │ │ - 92 │ │ │ │ │ - 93#if !defined(VINLINE_MALOC) │ │ │ │ │ - 94#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ - 95#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ - 96 │ │ │ │ │ - 97 │ │ │ │ │ -107int Vcom_init(int *argc, char ***argv); │ │ │ │ │ - 108 │ │ │ │ │ -116int Vcom_finalize(void); │ │ │ │ │ + 73 */ │ │ │ │ │ + 74 │ │ │ │ │ + 75#if !defined(VINLINE_MALOC) │ │ │ │ │ + 76#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ + 77#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ + 78 │ │ │ │ │ +88int Vmpi_init(int *argc, char ***argv); │ │ │ │ │ + 89 │ │ │ │ │ +97int Vmpi_finalize(void); │ │ │ │ │ + 98 │ │ │ │ │ +106Vmpi* Vmpi_ctor(void); │ │ │ │ │ + 107 │ │ │ │ │ +116void Vmpi_dtor(Vmpi **thee); │ │ │ │ │ 117 │ │ │ │ │ -127Vcom* Vcom_ctor(int commtype); │ │ │ │ │ - 128 │ │ │ │ │ -140int Vcom_ctor2(Vcom* thee, int commtype); │ │ │ │ │ - 141 │ │ │ │ │ -150void Vcom_dtor(Vcom **thee); │ │ │ │ │ - 151 │ │ │ │ │ -161void Vcom_dtor2(Vcom *thee); │ │ │ │ │ - 162 │ │ │ │ │ -177int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, │ │ │ │ │ - 178 int block); │ │ │ │ │ - 179 │ │ │ │ │ -197int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, │ │ │ │ │ - 198 int block); │ │ │ │ │ - 199 │ │ │ │ │ -214int Vcom_getCount(Vcom *thee, int src, int *length, int type); │ │ │ │ │ - 215 │ │ │ │ │ -237int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, │ │ │ │ │ - 238 int type, int op); │ │ │ │ │ - 239 │ │ │ │ │ -248int Vcom_size(Vcom *thee); │ │ │ │ │ - 249 │ │ │ │ │ -261int Vcom_resize(Vcom *thee, int newsize); │ │ │ │ │ - 262 │ │ │ │ │ -271int Vcom_rank(Vcom *thee); │ │ │ │ │ - 272 │ │ │ │ │ -281int Vcom_barr(Vcom *thee); │ │ │ │ │ - 282 │ │ │ │ │ - 283#endif /* _VCOM_H_ */ │ │ │ │ │ - 284 │ │ │ │ │ +126int Vmpi_rank(Vmpi *thee); │ │ │ │ │ + 127 │ │ │ │ │ +136int Vmpi_size(Vmpi *thee); │ │ │ │ │ + 137 │ │ │ │ │ +146int Vmpi_barr(Vmpi *thee); │ │ │ │ │ + 147 │ │ │ │ │ +159int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize); │ │ │ │ │ + 160 │ │ │ │ │ +172int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize); │ │ │ │ │ + 173 │ │ │ │ │ +184int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize); │ │ │ │ │ + 185 │ │ │ │ │ +197int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize); │ │ │ │ │ + 198 │ │ │ │ │ +210int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize); │ │ │ │ │ + 211 │ │ │ │ │ + 212#endif /* _VMPI_H_ */ │ │ │ │ │ + 213 │ │ │ │ │ maloc_base.h │ │ │ │ │ The base (or foundation) header for MALOC. │ │ │ │ │ vsys.h │ │ │ │ │ The primary header for VSYS. (Virtual SYStem utilities library.) │ │ │ │ │ -Vcom_rank │ │ │ │ │ -int Vcom_rank(Vcom *thee) │ │ │ │ │ -Get the ID of the local PE │ │ │ │ │ -Vcom_resize │ │ │ │ │ -int Vcom_resize(Vcom *thee, int newsize) │ │ │ │ │ -Resize (shrink) the communications group to include only newsize number of │ │ │ │ │ -processors.... │ │ │ │ │ -Vcom_ctor2 │ │ │ │ │ -int Vcom_ctor2(Vcom *thee, int commtype) │ │ │ │ │ -Construct the communications object. This routine sets up data members of class │ │ │ │ │ -and initializes MPI.... │ │ │ │ │ -Vcom_size │ │ │ │ │ -int Vcom_size(Vcom *thee) │ │ │ │ │ -Get the number of PEs in communicator. │ │ │ │ │ -Vcom_reduce │ │ │ │ │ -int Vcom_reduce(Vcom *thee, void *sendbuf, void *recvbuf, int length, int type, │ │ │ │ │ -int op) │ │ │ │ │ -Perform a reduction of the data across all processors. This is equivalent (and │ │ │ │ │ -in the case of MPI is ... │ │ │ │ │ -Vcom_ctor │ │ │ │ │ -Vcom * Vcom_ctor(int commtype) │ │ │ │ │ -Construct the communications object. This routine sets up data members of class │ │ │ │ │ -and initializes MPI. │ │ │ │ │ -Vcom_init │ │ │ │ │ -int Vcom_init(int *argc, char ***argv) │ │ │ │ │ +Vmpi_init │ │ │ │ │ +int Vmpi_init(int *argc, char ***argv) │ │ │ │ │ The Vmp initializer. │ │ │ │ │ -Vcom_finalize │ │ │ │ │ -int Vcom_finalize(void) │ │ │ │ │ +Vmpi_finalize │ │ │ │ │ +int Vmpi_finalize(void) │ │ │ │ │ The Vmp finalizer. │ │ │ │ │ -Vcom_barr │ │ │ │ │ -int Vcom_barr(Vcom *thee) │ │ │ │ │ -Synchronization barrier. │ │ │ │ │ -Vcom_dtor │ │ │ │ │ -void Vcom_dtor(Vcom **thee) │ │ │ │ │ -Destroy the communications object. │ │ │ │ │ -Vcom_recv │ │ │ │ │ -int Vcom_recv(Vcom *thee, int src, void *buf, int len, int type, int block) │ │ │ │ │ -Receive a (character) buffer. The blocking flag is present, but not used. All │ │ │ │ │ -receives are assumed ... │ │ │ │ │ -Vcom_getCount │ │ │ │ │ -int Vcom_getCount(Vcom *thee, int src, int *length, int type) │ │ │ │ │ -Perform a blocking probe to get the length (in number of items of specified │ │ │ │ │ -type) of an incoming mess... │ │ │ │ │ -Vcom_send │ │ │ │ │ -int Vcom_send(Vcom *thee, int des, void *buf, int len, int type, int block) │ │ │ │ │ -Send a buffer. Returns 1 on success. │ │ │ │ │ -Vcom_dtor2 │ │ │ │ │ -void Vcom_dtor2(Vcom *thee) │ │ │ │ │ -Destroy the communications object. This is broken into two parts to be callable │ │ │ │ │ -from FORTRAN. │ │ │ │ │ -sVcom │ │ │ │ │ -Contains public data members for Vcom class. │ │ │ │ │ -Definition vcom.h:60 │ │ │ │ │ -sVcom::type │ │ │ │ │ -int type │ │ │ │ │ -Communication type. 0 = not initialized 1 = Message Passing Interface 1.1. │ │ │ │ │ -Definition vcom.h:71 │ │ │ │ │ -sVcom::error │ │ │ │ │ -int error │ │ │ │ │ -note if any error has occurred on this vcom device │ │ │ │ │ -Definition vcom.h:73 │ │ │ │ │ -sVcom::mpi_size │ │ │ │ │ -int mpi_size │ │ │ │ │ -Total number of PEs in this communicator from MPI. │ │ │ │ │ -Definition vcom.h:65 │ │ │ │ │ -sVcom::core │ │ │ │ │ -void * core │ │ │ │ │ -Private MPI core. │ │ │ │ │ -Definition vcom.h:75 │ │ │ │ │ -sVcom::mpi_rank │ │ │ │ │ +Vmpi_size │ │ │ │ │ +int Vmpi_size(Vmpi *thee) │ │ │ │ │ +Return the number of processors involved. │ │ │ │ │ +Vmpi_reduce │ │ │ │ │ +int Vmpi_reduce(Vmpi *thee, char *sbuf, char *rbuf, int bufsize) │ │ │ │ │ +An MPI reduce. │ │ │ │ │ +Vmpi_recv │ │ │ │ │ +int Vmpi_recv(Vmpi *thee, int src, char *buf, int bufsize) │ │ │ │ │ +An MPI blocking receive. │ │ │ │ │ +Vmpi_isend │ │ │ │ │ +int Vmpi_isend(Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ +An MPI non-blocking send. │ │ │ │ │ +Vmpi_dtor │ │ │ │ │ +void Vmpi_dtor(Vmpi **thee) │ │ │ │ │ +The Vmpi destructor. │ │ │ │ │ +Vmpi_send │ │ │ │ │ +int Vmpi_send(Vmpi *thee, int des, char *buf, int bufsize) │ │ │ │ │ +An MPI blocking send. │ │ │ │ │ +Vmpi_ctor │ │ │ │ │ +Vmpi * Vmpi_ctor(void) │ │ │ │ │ +The Vmpi constructor. │ │ │ │ │ +Vmpi_barr │ │ │ │ │ +int Vmpi_barr(Vmpi *thee) │ │ │ │ │ +An MPI barrier. │ │ │ │ │ +Vmpi_bcast │ │ │ │ │ +int Vmpi_bcast(Vmpi *thee, char *buf, int bufsize) │ │ │ │ │ +An MPI broadcast. │ │ │ │ │ +Vmpi_rank │ │ │ │ │ +int Vmpi_rank(Vmpi *thee) │ │ │ │ │ +Return my processor ID. │ │ │ │ │ +sVmpi │ │ │ │ │ +Class Vmpi: Definition. │ │ │ │ │ +Definition vmpi.h:57 │ │ │ │ │ +sVmpi::mpi_rank │ │ │ │ │ int mpi_rank │ │ │ │ │ -Local PE rank from MPI. │ │ │ │ │ -Definition vcom.h:63 │ │ │ │ │ +Definition vmpi.h:58 │ │ │ │ │ +sVmpi::mpi_size │ │ │ │ │ +int mpi_size │ │ │ │ │ +Definition vmpi.h:59 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00015.dot.gz │ │ │ │ ├── a00015.dot │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ -digraph "vcom.h" │ │ │ │ │ +digraph "vmpi.h" │ │ │ │ │ { │ │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ │ bgcolor="transparent"; │ │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ │ - Node1 [id="Node000001",label="vcom.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ │ + Node1 [id="Node000001",label="vmpi.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc/maloc_base.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00002.html",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="assert.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node4 [id="Node000004",label="ctype.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ @@ -37,25 +37,25 @@ │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 [id="Node000018",label="maloc/vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ │ Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node19 [id="edge19_Node000018_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node20 [id="edge21_Node000018_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node20 [id="Node000020",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ Node20 -> Node2 [id="edge22_Node000020_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node21 [id="edge23_Node000018_Node000021",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ + Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ Node21 -> Node2 [id="edge24_Node000021_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node21 -> Node19 [id="edge25_Node000021_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node22 [id="edge26_Node000018_Node000022",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node22 -> Node2 [id="edge27_Node000022_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node19 [id="edge28_Node000022_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node20 [id="edge29_Node000022_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node23 [id="edge30_Node000018_Node000023",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ + Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ Node23 -> Node2 [id="edge31_Node000023_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00016.dot │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ -digraph "vcom.h" │ │ │ │ +digraph "vmpi.h" │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ - Node1 [id="Node000001",label="vcom.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ + Node1 [id="Node000001",label="vmpi.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node2 [id="Node000002",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 [id="Node000003",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00018.dot.gz │ │ │ │ ├── a00018.dot │ │ │ │ │ @@ -37,25 +37,25 @@ │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 [id="Node000018",label="maloc/vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ │ Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node19 [id="edge19_Node000018_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node19 [id="Node000019",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node20 [id="edge21_Node000018_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node20 [id="Node000020",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ Node20 -> Node2 [id="edge22_Node000020_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node21 [id="edge23_Node000018_Node000021",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ + Node21 [id="Node000021",label="maloc/vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ │ Node21 -> Node2 [id="edge24_Node000021_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node21 -> Node19 [id="edge25_Node000021_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node22 [id="edge26_Node000018_Node000022",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node22 [id="Node000022",label="maloc/vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node22 -> Node2 [id="edge27_Node000022_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node19 [id="edge28_Node000022_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node22 -> Node20 [id="edge29_Node000022_Node000020",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node18 -> Node23 [id="edge30_Node000018_Node000023",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ + Node23 [id="Node000023",label="maloc/vpred.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Header file for the Geometric Predicates."]; │ │ │ │ │ Node23 -> Node2 [id="edge31_Node000023_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00020.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vnm.h File Reference │ │ │ │ +MALOC: vset.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -40,190 +40,116 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Macros | │ │ │ │ +Classes | │ │ │ │ +Typedefs | │ │ │ │ Functions
│ │ │ │ -
vnm.h File Reference
│ │ │ │ +
vset.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ +

Class Vset: a dynamic set object. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ +#include <maloc/vnm.h>
│ │ │ │ +#include <maloc/vmem.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vnm.h:
│ │ │ │ +Include dependency graph for vset.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ -Macros

#define VPOW_SAFE(x, y)   (Vnm_powsafe(x,y))
 A safe VPOW function (avoids division by zero)
 
#define VTIMERS   100
 the maiximal timer constant
 

│ │ │ │ +Classes

struct  sVset
 Contains public data members for Vset class. More...
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Typedefs

typedef struct sVset Vset
 Declaration of the Vset class as the Vset structure.
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

int Vnm_sigInt (void)
 Signal and setjmp handling routine. Return the signal interrupt flag.
 
void Vnm_sigIntSet (void)
 Signal and setjmp handling routine. Set the signal interrupt flag.
 
void Vnm_sigIntClear (void)
 Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ -
 
int Vnm_jmpOk (void)
 Signal and setjmp handling routine. Return the "ok-to-jump" flag.
 
void Vnm_jmpOkSet (void)
 Signal and setjmp handling routine. Set the "okay-to-jump" flag.
 
void Vnm_jmpOkClear (void)
 Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ -
 
jmp_buf * Vnm_signalInit (void)
 Initialize the signal handling data structures.
 
void Vnm_regHand (void)
 Register the signal handler with the operating system.
 
void Vnm_sigHand (int num)
 Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".
 
double Vnm_powsafe (double x, double y)
 A safe VPOW function (avoids division by zero).
│ │ │ │ -
 
void Vnm_typeChk (void)
 Check out the sizes of various datatypes.
│ │ │ │ -
 
double Vnm_epsmac (void)
 Computes the unit roundoff of the machine in single
│ │ │ │ - precision. This is defined as the smallest positive machine number u such that 1.0d0 + u .ne. 1.0d0 (in single precision).
│ │ │ │ -
│ │ │ │ - A safe hardcoded machine epsilon as alternative:
│ │ │ │ - double value;
│ │ │ │ - value = 1.0e-9;
│ │ │ │ - return value;.
 
int Vnm_gentokens (char *buf, char **argv, const int argvmax, const char *white, const char *comment)
 Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens are separated by whitespace "white" with possible comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE!
 
void Vnm_tstart (int timer, const char *name)
 Starts the timer on the particular machine.
│ │ │ │ -
 
void Vnm_tstop (int timer, const char *name)
 Stops the timer on the particular machine.
 
char * Vnm_getuser (char *user, int usermax)
 Ask the system for the username.
 
char * Vnm_getos (char *os, int osmax)
 Ask the system for the operating system name.
 
char * Vnm_gethost (char *host, int hostmax)
 Ask the system for the hostname.
 
char * Vnm_gethome (char *path, int pathmax)
 Ask the system for the home directory.
 
char * Vnm_getcwd (char *path, int pathmax)
 Ask the system for the current working directory.
 
int Vnm_chdir (const char *path)
 Interact with the system to change the working directory.
 
int Vnm_mkdir (const char *path)
 Interact with the system to make a new directory.
│ │ │ │ -
 
int Vnm_system (const char *cmd)
 An improved ANSI-C "system" call.
 
int Vnm_systemBack (const char *cmd)
 A background variant of the ANSI-C "system" call.
│ │ │ │ -
 
int Vnm_systemKill (const char *cmd)
 Something like a UNIX "killall" call.
 
int Vnm_exec (int argc, char **argv)
 An improved UNIX "exec" call. This routine does not return except on error.
 
void Vnm_sleep (int nusecs)
 Implement a sleep function with microsecond resolution.
 
int Vnm_ioTag (void)
 Return my I/O tag.
 
int Vnm_nTags (void)
 Return the total number of tags.
 
void Vnm_setIoTag (int myTag, int numTags)
 Set my id.
 
FILE * Vnm_open (const int unit)
 Open an I/O console.
 
int Vnm_close (const int unit)
 Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_flush (const int unit)
 Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_redirect (const int flag)
 Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_print (const int unit, const char *format,...)
 External interface to the console i/o routine.
│ │ │ │ - We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_tprint (const int unit, const char *format,...)
 Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_qsort (int *u, int size)
 Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
 
void Vnm_qsortOrd (int *u, int *ord, int size)
 Front-end to quick sort integer array from [-large] to [+large].
 
void Vnm_dqsort (double *u, int size)
 Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
 
void Vnm_dqsortOrd (double *u, int *ord, int size)
 Front-end to quick sort integer array from [-large] to [+large].
 
int Vset_num (Vset *thee)
 Return the number of things currently in the list.
 
char * Vset_access (Vset *thee, int i)
 Access an object in an arbitrary place in the list.
 
char * Vset_create (Vset *thee)
 Create an object on the end of the list.
│ │ │ │ +
 
char * Vset_first (Vset *thee)
 Return the first object in the set.
│ │ │ │ +
 
char * Vset_last (Vset *thee)
 Return the last object in the set.
 
char * Vset_next (Vset *thee)
 Return the next object in the set.
 
char * Vset_prev (Vset *thee)
 Return the prev object in the set.
 
char * Vset_peekFirst (Vset *thee)
 Return the first object in the set.
 
char * Vset_peekLast (Vset *thee)
 Return the last object in the set.
 
void Vset_destroy (Vset *thee)
 Delete an object from the end of the list.
 
VsetVset_ctor (Vmem *vmem, const char *tname, int tsize, int tmaxNum, int ioKey)
 Construct the set object.
 
void Vset_dtor (Vset **thee)
 Destroy the set object.
 
char * Vset_createLast (Vset *thee)
 Create an object on the end of the list.
 
void Vset_destroyLast (Vset *thee)
 Free up the object currently on the end of the list.
 
void Vset_initData (Vset *thee)
 Initialize the Vset data (thee).
 
void Vset_reset (Vset *thee)
 Release all Ram controlled by this (thee) and re-initialize.
 
void Vset_check (Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd)
 Get and return the RAM Control Block (thee) information.
 
void Vset_memChk (Vset *thee)
 Print the exact current malloc usage.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Header file for an ISO C [V]irtual [N]umerical [M]achine.

│ │ │ │ +

Class Vset: a dynamic set object.

│ │ │ │
Author
Michael Holst
│ │ │ │
Note
None
│ │ │ │
Version
│ │ │ │ -
Id
vnm.h,v 1.22 2010/08/12 05:40:36 fetk Exp
│ │ │ │ +
Id
vset.h,v 1.20 2010/08/12 05:40:37 fetk Exp
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │  * License as published by the Free Software Foundation; either
│ │ │ │ @@ -235,1449 +161,14 @@
│ │ │ │  * Lesser General Public License for more details.
│ │ │ │  *
│ │ │ │  * You should have received a copy of the GNU Lesser General Public
│ │ │ │  * License along with this library; if not, write to the Free Software
│ │ │ │  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
│ │ │ │  * 
│ │ │ │  *  
│ │ │ │ -

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ VPOW_SAFE

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define VPOW_SAFE( x,
 
)   (Vnm_powsafe(x,y))
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

A safe VPOW function (avoids division by zero)

│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ VTIMERS

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define VTIMERS   100
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

the maiximal timer constant

│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -

Function Documentation

│ │ │ │ - │ │ │ │ -

◆ Vnm_chdir()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_chdir (const char * path)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Interact with the system to change the working directory.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
pathPointer to the path
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_close()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_close (const int unit)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
unitindex for the file unit
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_dqsort()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_dqsort (double * u,
int size 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
uPointer to quick sort integer array
sizesize of the integer array
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_dqsortOrd()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_dqsortOrd (double * u,
int * ord,
int size 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Front-end to quick sort integer array from [-large] to [+large].

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
uPointer to quick sort integer array
ordPointer to reordered array
sizesize of the integer array
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_epsmac()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
double Vnm_epsmac (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Computes the unit roundoff of the machine in single
│ │ │ │ - precision. This is defined as the smallest positive machine number u such that 1.0d0 + u .ne. 1.0d0 (in single precision).
│ │ │ │ -
│ │ │ │ - A safe hardcoded machine epsilon as alternative:
│ │ │ │ - double value;
│ │ │ │ - value = 1.0e-9;
│ │ │ │ - return value;.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
the unit roundoff of the machine in single precision.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_exec()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_exec (int argc,
char ** argv 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

An improved UNIX "exec" call. This routine does not return except on error.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
no return except on error
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
argcnumber of the command line arguments
argvthe command line arguments
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_flush()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_flush (const int unit)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
unitindex for the file unit
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_gentokens()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_gentokens (char * buf,
char ** argv,
const int argvmax,
const char * white,
const char * comment 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens are separated by whitespace "white" with possible comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE!

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
│ │ │ │ - Again, the input string "buf" IS MODIFIED; white space characters (defined in the input string "white") are replaced by the NULL character '\0'. The output "argv" is simply a list of pointers
│ │ │ │ - to the start of the tokens in "buf", which are NULL-terminated
│ │ │ │ - after we replace the white space with NULLs.
│ │ │ │ -
│ │ │ │ - We follow convention and "NULL"-terminate "argv" by setting the pointer following the last token to "VNULL". The return value is "argc", the number of tokens found (not including the terminating NULL pointer). For safety you must pass in the maximal length of argv in the parameter "argvmax".
│ │ │ │ -
│ │ │ │ - If we encounter a token which begins with a comment character (defined in the input string "comment"), then we ignore the rest of the tokens in the input buffer "buf". This is suitable
│ │ │ │ - for parsing shell languages such as sh/ksh/bash which have comments that start with e.g. "#" and continue until a newline.
│ │ │ │ -
│ │ │ │ - We DO NOT use the C library function strtok in this routine. (There are some bad implementations of strtok around apparently; the internal state variables maintained by strtok can get very
│ │ │ │ - messed up if you use strtok in multiple places in a code.)
│ │ │ │ -
Returns
number of tokens
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
bufbuffer containing message
argvthe command line arguments
argvmaxmaximal number of the command line arguments
whitePointer to the input string
commenttoken which begins with a comment character
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_getcwd()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
char * Vnm_getcwd (char * path,
int pathmax 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Ask the system for the current working directory.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
│ │ │ │ - Consider it an error if we can't return something useful; therefore we will VASSERT(path!=VNULL) before returning.
│ │ │ │ -
│ │ │ │ - Note that unlike Vnm_gethome, a call to Vnm_getcwd returns the current directory, possibly modified from call to call.
│ │ │ │ -
│ │ │ │ - I.e., calls to Vnm_chdir can change the current working
│ │ │ │ - directory; Vnm_getcwd returns the current directory, whatever that might be.
│ │ │ │ -
Returns
the current working directory
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
pathPointer to the path
pathmaxindex for the size of path
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_gethome()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
char * Vnm_gethome (char * path,
int pathmax 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Ask the system for the home directory.

│ │ │ │ -

=

Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
│ │ │ │ - The following preference order is used to set the home directory:
│ │ │ │ -
│ │ │ │ - MCSH_HOME (the user must define this in his environment)
│ │ │ │ - CWD (always defined as the current working directory)
│ │ │ │ -
│ │ │ │ - We consider it an error if we can't return something useful;
│ │ │ │ - therefore we will VASSERT(path!=VNULL) before returning.
│ │ │ │ -
│ │ │ │ - We settle on a home directory the first time we are called, and then we simply return this fixed home directory forever.
│ │ │ │ - In other words, the first call to Vnm_gethome, regardless of
│ │ │ │ - who makes the call, establishes the home directory for everyone else (as long as everyone goes through Vnm_gethome!).
│ │ │ │ -
Returns
the home directory
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
pathPointer to the path
pathmaxindex for the size of path
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_gethost()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
char * Vnm_gethost (char * host,
int hostmax 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Ask the system for the hostname.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
the hostname
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
hostPointer to the hostname.
hostmaxindex for maximal size of host name
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_getos()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
char * Vnm_getos (char * os,
int osmax 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Ask the system for the operating system name.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
the operating system name
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
osPointer to the OS type
osmaxindex for maximal size of OS name
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_getuser()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
char * Vnm_getuser (char * user,
int usermax 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Ask the system for the username.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
the username of the system
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
userPointer to the username of the system
usermaxindex for maximal size of user name
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_ioTag()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_ioTag (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Return my I/O tag.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
my I/O tag.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_jmpOk()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_jmpOk (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Return the "ok-to-jump" flag.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
"ok-to-jump" flag.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_jmpOkClear()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_jmpOkClear (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_jmpOkSet()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_jmpOkSet (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Set the "okay-to-jump" flag.

│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_mkdir()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_mkdir (const char * path)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Interact with the system to make a new directory.
│ │ │ │ -

│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
pathPointer to the path
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_nTags()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_nTags (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Return the total number of tags.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
total number of tags.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_open()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
FILE * Vnm_open (const int unit)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Open an I/O console.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
We MUST NOT use VASSERT (or Vnm_print!) in this routine.   
│ │ │ │ -
│ │ │ │ -The following codes are used:                                               
│ │ │ │ -
│ │ │ │ -unit#      C output unit      
│ │ │ │ --------    -------------                                                
│ │ │ │ -
│ │ │ │ -unit==0    garbage   -- Non-interactive i/o; lots of stuff                        
│ │ │ │ -                        (can be redirected to ${MCSH_HOME/io.mc)
│ │ │ │ -
│ │ │ │ -unit==1    stdout    -- standard output (Interactive I/O)            
│ │ │ │ -
│ │ │ │ -unit==2    stderr    -- standard error (IMPORTANT interactive I/O)          
│ │ │ │ -
│ │ │ │ -unit==3    history   -- History file ${MCSH_HOME}/hist.mcsh                       
│ │ │ │ -
│ │ │ │ -unit==else /dev/null -- Error...                                
│ │ │ │ -
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
unitindex for the file unit
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_powsafe()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
double Vnm_powsafe (double x,
double y 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

A safe VPOW function (avoids division by zero).
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
output value of a VPOW function
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
xinput parameter
yinput parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_print()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_print (const int unit,
const char * format,
 ... 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

External interface to the console i/o routine.
│ │ │ │ - We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
unitindex for the file unit
formatPointer to the print format
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_qsort()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_qsort (int * u,
int size 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
uPointer to quick sort integer array
sizesize of the integer array
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_qsortOrd()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_qsortOrd (int * u,
int * ord,
int size 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Front-end to quick sort integer array from [-large] to [+large].

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None *
│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
uPointer to quick sort integer array
ordPointer to reordered array
sizesize of the integer array
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_redirect()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_redirect (const int flag)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
flagindex for the redirect flag
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_regHand()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_regHand (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Register the signal handler with the operating system.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_setIoTag()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_setIoTag (int myTag,
int numTags 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Set my id.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
myTagindex for the tag
numTagsnumber of tags
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_sigHand()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_sigHand (int num)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_sigInt()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_sigInt (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Return the signal interrupt flag.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
Signal interrupt flag.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_sigIntClear()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_sigIntClear (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_sigIntSet()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_sigIntSet (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Signal and setjmp handling routine. Set the signal interrupt flag.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_signalInit()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
jmp_buf * Vnm_signalInit (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Initialize the signal handling data structures.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
the signal handling data structures
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_sleep()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_sleep (int nusecs)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Implement a sleep function with microsecond resolution.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ - This is hacked out of the "sleep_us" example in Rick Steven's Advance Unix Programming book.
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
nusecsnumber of microseconds
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_system()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_system (const char * cmd)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

An improved ANSI-C "system" call.

│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
cmdPointer to the command
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_systemBack()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_systemBack (const char * cmd)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

A background variant of the ANSI-C "system" call.
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
cmdPointer to the command
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_systemKill()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
int Vnm_systemKill (const char * cmd)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Something like a UNIX "killall" call.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
Success enumeration
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ -
cmdPointer to the command
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_tprint()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_tprint (const int unit,
const char * format,
 ... 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o) For a tag to be added, both of the following conditions must hold:
│ │ │ │ - Vnm_ioTag() >= 0 (I.e., I must have been given a tag)
│ │ │ │ - Vnm_nTags() > 1 (I must not be the only one given a tag)
│ │ │ │ -
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
unitindex for the file unit
formatPointer to the print format
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_tstart()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_tstart (int timer,
const char * name 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Starts the timer on the particular machine.
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
timerindex for the starting timer
namePointer to the object
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_tstop()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_tstop (int timer,
const char * name 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Stops the timer on the particular machine.

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
timerindex for the starting timer
namePointer to the object
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vnm_typeChk()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vnm_typeChk (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Check out the sizes of various datatypes.
│ │ │ │ -

│ │ │ │ -
Author
Michael Holst
│ │ │ │ -
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ -
Returns
None
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,188 +3,100 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * vsys │ │ │ │ │ * maloc │ │ │ │ │ -Macros | Functions │ │ │ │ │ -vnm.h File Reference │ │ │ │ │ -Header file for an ISO C [V]irtual [N]umerical [M]achine. More... │ │ │ │ │ +Classes | Typedefs | Functions │ │ │ │ │ +vset.h File Reference │ │ │ │ │ +Vset_class │ │ │ │ │ +Class Vset: a dynamic set object. More... │ │ │ │ │ #include │ │ │ │ │ -Include dependency graph for vnm.h: │ │ │ │ │ +#include │ │ │ │ │ +#include │ │ │ │ │ +Include dependency graph for vset.h: │ │ │ │ │ This graph shows which files directly or indirectly include this file: │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Macros │ │ │ │ │ -#define VPOW_SAFE(x, y)   (Vnm_powsafe(x,y)) │ │ │ │ │ -  A safe VPOW function (avoids division by zero) │ │ │ │ │ -  │ │ │ │ │ -#define VTIMERS   100 │ │ │ │ │ -  the maiximal timer constant │ │ │ │ │ + Classes │ │ │ │ │ +struct  sVset │ │ │ │ │ +  Contains public data members for Vset class. More... │ │ │ │ │ +  │ │ │ │ │ + Typedefs │ │ │ │ │ +typedef struct sVset Vset │ │ │ │ │ +  Declaration of the Vset class as the Vset structure. │ │ │ │ │   │ │ │ │ │ Functions │ │ │ │ │ - int Vnm_sigInt (void) │ │ │ │ │ -  Signal and setjmp handling routine. Return the signal interrupt │ │ │ │ │ - flag. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_sigIntSet (void) │ │ │ │ │ -  Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │ + int Vset_num (Vset *thee) │ │ │ │ │ +  Return the number of things currently in the list. │ │ │ │ │   │ │ │ │ │ - void Vnm_sigIntClear (void) │ │ │ │ │ - Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │ +char * Vset_access (Vset *thee, int i) │ │ │ │ │ +  Access an object in an arbitrary place in the list. │ │ │ │ │   │ │ │ │ │ +char * Vset_create (Vset *thee) │ │ │ │ │ +  Create an object on the end of the list. │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ - int Vnm_jmpOk (void) │ │ │ │ │ -  Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_jmpOkSet (void) │ │ │ │ │ -  Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_jmpOkClear (void) │ │ │ │ │ -  Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ +char * Vset_first (Vset *thee) │ │ │ │ │ +  Return the first object in the set. │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ -jmp_buf * Vnm_signalInit (void) │ │ │ │ │ -  Initialize the signal handling data structures. │ │ │ │ │ +char * Vset_last (Vset *thee) │ │ │ │ │ +  Return the last object in the set. │ │ │ │ │   │ │ │ │ │ - void Vnm_regHand (void) │ │ │ │ │ -  Register the signal handler with the operating system. │ │ │ │ │ +char * Vset_next (Vset *thee) │ │ │ │ │ +  Return the next object in the set. │ │ │ │ │   │ │ │ │ │ - void Vnm_sigHand (int num) │ │ │ │ │ -  Handle events such as SIGINT. We must have first been registered │ │ │ │ │ - with "Vnm_signalInit". │ │ │ │ │ +char * Vset_prev (Vset *thee) │ │ │ │ │ +  Return the prev object in the set. │ │ │ │ │   │ │ │ │ │ - double Vnm_powsafe (double x, double y) │ │ │ │ │ -  A safe VPOW function (avoids division by zero). │ │ │ │ │ - │ │ │ │ │ +char * Vset_peekFirst (Vset *thee) │ │ │ │ │ +  Return the first object in the set. │ │ │ │ │   │ │ │ │ │ - void Vnm_typeChk (void) │ │ │ │ │ -  Check out the sizes of various datatypes. │ │ │ │ │ - │ │ │ │ │ +char * Vset_peekLast (Vset *thee) │ │ │ │ │ +  Return the last object in the set. │ │ │ │ │   │ │ │ │ │ - double Vnm_epsmac (void) │ │ │ │ │ - Computes the unit roundoff of the machine in single │ │ │ │ │ - precision. This is defined as the smallest positive machine number u │ │ │ │ │ - such that 1.0d0 + u .ne. 1.0d0 (in single precision). │ │ │ │ │ -  │ │ │ │ │ - A safe hardcoded machine epsilon as alternative: │ │ │ │ │ - double value; │ │ │ │ │ - value = 1.0e-9; │ │ │ │ │ - return value;. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_gentokens (char *buf, char **argv, const int argvmax, const char │ │ │ │ │ - *white, const char *comment) │ │ │ │ │ - Generate an [argv,argc] pair from a character string "buf" (assumed │ │ │ │ │ -  NULL-terminated) in which tokens are separated by whitespace "white" │ │ │ │ │ - with possible comments "comment" occuring. THE INPUT STRING IS │ │ │ │ │ - MODIFIED HERE! │ │ │ │ │ + void Vset_destroy (Vset *thee) │ │ │ │ │ +  Delete an object from the end of the list. │ │ │ │ │   │ │ │ │ │ - void Vnm_tstart (int timer, const char *name) │ │ │ │ │ -  Starts the timer on the particular machine. │ │ │ │ │ - │ │ │ │ │ +Vset * Vset_ctor (Vmem *vmem, const char *tname, int tsize, int tmaxNum, int │ │ │ │ │ + ioKey) │ │ │ │ │ +  Construct the set object. │ │ │ │ │   │ │ │ │ │ - void Vnm_tstop (int timer, const char *name) │ │ │ │ │ -  Stops the timer on the particular machine. │ │ │ │ │ + void Vset_dtor (Vset **thee) │ │ │ │ │ +  Destroy the set object. │ │ │ │ │   │ │ │ │ │ - char * Vnm_getuser (char *user, int usermax) │ │ │ │ │ -  Ask the system for the username. │ │ │ │ │ +char * Vset_createLast (Vset *thee) │ │ │ │ │ +  Create an object on the end of the list. │ │ │ │ │   │ │ │ │ │ - char * Vnm_getos (char *os, int osmax) │ │ │ │ │ -  Ask the system for the operating system name. │ │ │ │ │ + void Vset_destroyLast (Vset *thee) │ │ │ │ │ +  Free up the object currently on the end of the list. │ │ │ │ │   │ │ │ │ │ - char * Vnm_gethost (char *host, int hostmax) │ │ │ │ │ -  Ask the system for the hostname. │ │ │ │ │ + void Vset_initData (Vset *thee) │ │ │ │ │ +  Initialize the Vset data (thee). │ │ │ │ │   │ │ │ │ │ - char * Vnm_gethome (char *path, int pathmax) │ │ │ │ │ -  Ask the system for the home directory. │ │ │ │ │ + void Vset_reset (Vset *thee) │ │ │ │ │ +  Release all Ram controlled by this (thee) and re-initialize. │ │ │ │ │   │ │ │ │ │ - char * Vnm_getcwd (char *path, int pathmax) │ │ │ │ │ -  Ask the system for the current working directory. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_chdir (const char *path) │ │ │ │ │ -  Interact with the system to change the working directory. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_mkdir (const char *path) │ │ │ │ │ -  Interact with the system to make a new directory. │ │ │ │ │ - │ │ │ │ │ -  │ │ │ │ │ - int Vnm_system (const char *cmd) │ │ │ │ │ -  An improved ANSI-C "system" call. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_systemBack (const char *cmd) │ │ │ │ │ -  A background variant of the ANSI-C "system" call. │ │ │ │ │ - │ │ │ │ │ + void Vset_check (Vset *thee, int *tnum, int *tsize, int *tVecUse, int │ │ │ │ │ + *tVecMal, int *tVecOhd) │ │ │ │ │ +  Get and return the RAM Control Block (thee) information. │ │ │ │ │   │ │ │ │ │ - int Vnm_systemKill (const char *cmd) │ │ │ │ │ -  Something like a UNIX "killall" call. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_exec (int argc, char **argv) │ │ │ │ │ -  An improved UNIX "exec" call. This routine does not return except on │ │ │ │ │ - error. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_sleep (int nusecs) │ │ │ │ │ -  Implement a sleep function with microsecond resolution. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_ioTag (void) │ │ │ │ │ -  Return my I/O tag. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_nTags (void) │ │ │ │ │ -  Return the total number of tags. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_setIoTag (int myTag, int numTags) │ │ │ │ │ -  Set my id. │ │ │ │ │ -  │ │ │ │ │ - FILE * Vnm_open (const int unit) │ │ │ │ │ -  Open an I/O console. │ │ │ │ │ -  │ │ │ │ │ - int Vnm_close (const int unit) │ │ │ │ │ -  Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ - this routine. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_flush (const int unit) │ │ │ │ │ -  Attempt to flush the specified i/o stream. We MUST NOT use VASSERT │ │ │ │ │ - (or Vnm_print!) in this routine. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_redirect (const int flag) │ │ │ │ │ - Set/unset the redirect flag for UNIT zero. When redirected, I/O goes │ │ │ │ │ -  to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or │ │ │ │ │ - Vnm_print!) in this routine. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_print (const int unit, const char *format,...) │ │ │ │ │ -  External interface to the console i/o routine. │ │ │ │ │ - We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_tprint (const int unit, const char *format,...) │ │ │ │ │ -  Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or │ │ │ │ │ - Vnm_print!) in this routine. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_qsort (int *u, int size) │ │ │ │ │ -  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - │ │ │ │ │ -  │ │ │ │ │ - void Vnm_qsortOrd (int *u, int *ord, int size) │ │ │ │ │ -  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ -  │ │ │ │ │ - void Vnm_dqsort (double *u, int size) │ │ │ │ │ -  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - │ │ │ │ │ -  │ │ │ │ │ - void Vnm_dqsortOrd (double *u, int *ord, int size) │ │ │ │ │ -  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + void Vset_memChk (Vset *thee) │ │ │ │ │ +  Print the exact current malloc usage. │ │ │ │ │   │ │ │ │ │ ***** Detailed Description ***** │ │ │ │ │ -Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ │ +Class Vset: a dynamic set object. │ │ │ │ │ Author │ │ │ │ │ Michael Holst │ │ │ │ │ Note │ │ │ │ │ None │ │ │ │ │ Version │ │ │ │ │ Id │ │ │ │ │ - vnm.h,v 1.22 2010/08/12 05:40:36 fetk Exp │ │ │ │ │ + vset.h,v 1.20 2010/08/12 05:40:37 fetk Exp │ │ │ │ │ Attention │ │ │ │ │ * │ │ │ │ │ * MALOC = < Minimal Abstraction Layer for Object-oriented C > │ │ │ │ │ * Copyright (C) 1994-- Michael Holst │ │ │ │ │ * │ │ │ │ │ * This library is free software; you can redistribute it and/or │ │ │ │ │ * modify it under the terms of the GNU Lesser General Public │ │ │ │ │ @@ -197,592 +109,10 @@ │ │ │ │ │ * Lesser General Public License for more details. │ │ │ │ │ * │ │ │ │ │ * You should have received a copy of the GNU Lesser General Public │ │ │ │ │ * License along with this library; if not, write to the Free Software │ │ │ │ │ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA │ │ │ │ │ * │ │ │ │ │ * │ │ │ │ │ -***** Macro Definition Documentation ***** │ │ │ │ │ -***** ◆ VPOW_SAFE ***** │ │ │ │ │ -#define VPOW_SAFE (  x, │ │ │ │ │ -  y  │ │ │ │ │ - )    (Vnm_powsafe(x,y)) │ │ │ │ │ -A safe VPOW function (avoids division by zero) │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ -***** ◆ VTIMERS ***** │ │ │ │ │ -#define VTIMERS   100 │ │ │ │ │ -the maiximal timer constant │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ -***** Function Documentation ***** │ │ │ │ │ -***** ◆ Vnm_chdir() ***** │ │ │ │ │ -int Vnm_chdir ( const char * path ) │ │ │ │ │ -Interact with the system to change the working directory. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - path Pointer to the path │ │ │ │ │ -***** ◆ Vnm_close() ***** │ │ │ │ │ -int Vnm_close ( const int unit ) │ │ │ │ │ -Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - unit index for the file unit │ │ │ │ │ -***** ◆ Vnm_dqsort() ***** │ │ │ │ │ -void Vnm_dqsort ( double * u, │ │ │ │ │ - int  size  │ │ │ │ │ - ) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - u Pointer to quick sort integer array │ │ │ │ │ - size size of the integer array │ │ │ │ │ -***** ◆ Vnm_dqsortOrd() ***** │ │ │ │ │ -void Vnm_dqsortOrd ( double * u, │ │ │ │ │ - int *  ord, │ │ │ │ │ - int  size  │ │ │ │ │ - ) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - u Pointer to quick sort integer array │ │ │ │ │ - ord Pointer to reordered array │ │ │ │ │ - size size of the integer array │ │ │ │ │ -***** ◆ Vnm_epsmac() ***** │ │ │ │ │ -double Vnm_epsmac ( void  ) │ │ │ │ │ -Computes the unit roundoff of the machine in single │ │ │ │ │ -precision. This is defined as the smallest positive machine number u such that │ │ │ │ │ -1.0d0 + u .ne. 1.0d0 (in single precision). │ │ │ │ │ - │ │ │ │ │ -A safe hardcoded machine epsilon as alternative: │ │ │ │ │ -double value; │ │ │ │ │ -value = 1.0e-9; │ │ │ │ │ -return value;. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - the unit roundoff of the machine in single precision. │ │ │ │ │ -***** ◆ Vnm_exec() ***** │ │ │ │ │ -int Vnm_exec ( int  argc, │ │ │ │ │ - char ** argv  │ │ │ │ │ - ) │ │ │ │ │ -An improved UNIX "exec" call. This routine does not return except on error. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - no return except on error │ │ │ │ │ - Parameters │ │ │ │ │ - argc number of the command line arguments │ │ │ │ │ - argv the command line arguments │ │ │ │ │ -***** ◆ Vnm_flush() ***** │ │ │ │ │ -void Vnm_flush ( const int unit ) │ │ │ │ │ -Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or │ │ │ │ │ -Vnm_print!) in this routine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - unit index for the file unit │ │ │ │ │ -***** ◆ Vnm_gentokens() ***** │ │ │ │ │ -int Vnm_gentokens ( char *  buf, │ │ │ │ │ - char **  argv, │ │ │ │ │ - const int  argvmax, │ │ │ │ │ - const char * white, │ │ │ │ │ - const char * comment  │ │ │ │ │ - ) │ │ │ │ │ -Generate an [argv,argc] pair from a character string "buf" (assumed NULL- │ │ │ │ │ -terminated) in which tokens are separated by whitespace "white" with possible │ │ │ │ │ -comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE! │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - │ │ │ │ │ - Again, the input string "buf" IS MODIFIED; white space characters │ │ │ │ │ - (defined in the input string "white") are replaced by the NULL character │ │ │ │ │ - '\0'. The output "argv" is simply a list of pointers │ │ │ │ │ - to the start of the tokens in "buf", which are NULL-terminated │ │ │ │ │ - after we replace the white space with NULLs. │ │ │ │ │ - │ │ │ │ │ - We follow convention and "NULL"-terminate "argv" by setting the pointer │ │ │ │ │ - following the last token to "VNULL". The return value is "argc", the │ │ │ │ │ - number of tokens found (not including the terminating NULL pointer). For │ │ │ │ │ - safety you must pass in the maximal length of argv in the parameter │ │ │ │ │ - "argvmax". │ │ │ │ │ - │ │ │ │ │ - If we encounter a token which begins with a comment character (defined in │ │ │ │ │ - the input string "comment"), then we ignore the rest of the tokens in the │ │ │ │ │ - input buffer "buf". This is suitable │ │ │ │ │ - for parsing shell languages such as sh/ksh/bash which have comments that │ │ │ │ │ - start with e.g. "#" and continue until a newline. │ │ │ │ │ - │ │ │ │ │ - We DO NOT use the C library function strtok in this routine. (There are │ │ │ │ │ - some bad implementations of strtok around apparently; the internal state │ │ │ │ │ - variables maintained by strtok can get very │ │ │ │ │ - messed up if you use strtok in multiple places in a code.) │ │ │ │ │ - Returns │ │ │ │ │ - number of tokens │ │ │ │ │ - Parameters │ │ │ │ │ - buf buffer containing message │ │ │ │ │ - argv the command line arguments │ │ │ │ │ - argvmax maximal number of the command line arguments │ │ │ │ │ - white Pointer to the input string │ │ │ │ │ - comment token which begins with a comment character │ │ │ │ │ -***** ◆ Vnm_getcwd() ***** │ │ │ │ │ -char * Vnm_getcwd ( char * path, │ │ │ │ │ - int  pathmax  │ │ │ │ │ - ) │ │ │ │ │ -Ask the system for the current working directory. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - │ │ │ │ │ - Consider it an error if we can't return something useful; therefore we │ │ │ │ │ - will VASSERT(path!=VNULL) before returning. │ │ │ │ │ - │ │ │ │ │ - Note that unlike Vnm_gethome, a call to Vnm_getcwd returns the current │ │ │ │ │ - directory, possibly modified from call to call. │ │ │ │ │ - │ │ │ │ │ - I.e., calls to Vnm_chdir can change the current working │ │ │ │ │ - directory; Vnm_getcwd returns the current directory, whatever that might │ │ │ │ │ - be. │ │ │ │ │ - Returns │ │ │ │ │ - the current working directory │ │ │ │ │ - Parameters │ │ │ │ │ - path Pointer to the path │ │ │ │ │ - pathmax index for the size of path │ │ │ │ │ -***** ◆ Vnm_gethome() ***** │ │ │ │ │ -char * Vnm_gethome ( char * path, │ │ │ │ │ - int  pathmax  │ │ │ │ │ - ) │ │ │ │ │ -Ask the system for the home directory. │ │ │ │ │ -= │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - │ │ │ │ │ - The following preference order is used to set the home directory: │ │ │ │ │ - │ │ │ │ │ - MCSH_HOME (the user must define this in his environment) │ │ │ │ │ - CWD (always defined as the current working directory) │ │ │ │ │ - │ │ │ │ │ - We consider it an error if we can't return something useful; │ │ │ │ │ - therefore we will VASSERT(path!=VNULL) before returning. │ │ │ │ │ - │ │ │ │ │ - We settle on a home directory the first time we are called, and then we │ │ │ │ │ - simply return this fixed home directory forever. │ │ │ │ │ - In other words, the first call to Vnm_gethome, regardless of │ │ │ │ │ - who makes the call, establishes the home directory for everyone else (as │ │ │ │ │ - long as everyone goes through Vnm_gethome!). │ │ │ │ │ - Returns │ │ │ │ │ - the home directory │ │ │ │ │ - Parameters │ │ │ │ │ - path Pointer to the path │ │ │ │ │ - pathmax index for the size of path │ │ │ │ │ -***** ◆ Vnm_gethost() ***** │ │ │ │ │ -char * Vnm_gethost ( char * host, │ │ │ │ │ - int  hostmax  │ │ │ │ │ - ) │ │ │ │ │ -Ask the system for the hostname. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - the hostname │ │ │ │ │ - Parameters │ │ │ │ │ - host Pointer to the hostname. │ │ │ │ │ - hostmax index for maximal size of host name │ │ │ │ │ -***** ◆ Vnm_getos() ***** │ │ │ │ │ -char * Vnm_getos ( char * os, │ │ │ │ │ - int  osmax  │ │ │ │ │ - ) │ │ │ │ │ -Ask the system for the operating system name. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - the operating system name │ │ │ │ │ - Parameters │ │ │ │ │ - os Pointer to the OS type │ │ │ │ │ - osmax index for maximal size of OS name │ │ │ │ │ -***** ◆ Vnm_getuser() ***** │ │ │ │ │ -char * Vnm_getuser ( char * user, │ │ │ │ │ - int  usermax  │ │ │ │ │ - ) │ │ │ │ │ -Ask the system for the username. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - the username of the system │ │ │ │ │ - Parameters │ │ │ │ │ - user Pointer to the username of the system │ │ │ │ │ - usermax index for maximal size of user name │ │ │ │ │ -***** ◆ Vnm_ioTag() ***** │ │ │ │ │ -int Vnm_ioTag ( void  ) │ │ │ │ │ -Return my I/O tag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - my I/O tag. │ │ │ │ │ -***** ◆ Vnm_jmpOk() ***** │ │ │ │ │ -int Vnm_jmpOk ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - "ok-to-jump" flag. │ │ │ │ │ -***** ◆ Vnm_jmpOkClear() ***** │ │ │ │ │ -void Vnm_jmpOkClear ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_jmpOkSet() ***** │ │ │ │ │ -void Vnm_jmpOkSet ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_mkdir() ***** │ │ │ │ │ -int Vnm_mkdir ( const char * path ) │ │ │ │ │ -Interact with the system to make a new directory. │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - path Pointer to the path │ │ │ │ │ -***** ◆ Vnm_nTags() ***** │ │ │ │ │ -int Vnm_nTags ( void  ) │ │ │ │ │ -Return the total number of tags. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - total number of tags. │ │ │ │ │ -***** ◆ Vnm_open() ***** │ │ │ │ │ -FILE * Vnm_open ( const int unit ) │ │ │ │ │ -Open an I/O console. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ - │ │ │ │ │ - The following codes are used: │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - unit# C output unit │ │ │ │ │ - ------- ------------- │ │ │ │ │ - │ │ │ │ │ - unit==0 garbage -- Non-interactive i/o; lots of stuff │ │ │ │ │ - │ │ │ │ │ - (can be redirected to ${MCSH_HOME/io.mc) │ │ │ │ │ - │ │ │ │ │ - unit==1 stdout -- standard output (Interactive I/O) │ │ │ │ │ - │ │ │ │ │ - unit==2 stderr -- standard error (IMPORTANT interactive I/O) │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - unit==3 history -- History file ${MCSH_HOME}/hist.mcsh │ │ │ │ │ - │ │ │ │ │ - │ │ │ │ │ - unit==else /dev/null -- Error... │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - unit index for the file unit │ │ │ │ │ -***** ◆ Vnm_powsafe() ***** │ │ │ │ │ -double Vnm_powsafe ( double x, │ │ │ │ │ - double y  │ │ │ │ │ - ) │ │ │ │ │ -A safe VPOW function (avoids division by zero). │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - output value of a VPOW function │ │ │ │ │ - Parameters │ │ │ │ │ - x input parameter │ │ │ │ │ - y input parameter │ │ │ │ │ -***** ◆ Vnm_print() ***** │ │ │ │ │ -void Vnm_print ( const int  unit, │ │ │ │ │ - const char * format, │ │ │ │ │ -   ...  │ │ │ │ │ - ) │ │ │ │ │ -External interface to the console i/o routine. │ │ │ │ │ -We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - unit index for the file unit │ │ │ │ │ - format Pointer to the print format │ │ │ │ │ -***** ◆ Vnm_qsort() ***** │ │ │ │ │ -void Vnm_qsort ( int * u, │ │ │ │ │ - int  size  │ │ │ │ │ - ) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - u Pointer to quick sort integer array │ │ │ │ │ - size size of the integer array │ │ │ │ │ -***** ◆ Vnm_qsortOrd() ***** │ │ │ │ │ -void Vnm_qsortOrd ( int * u, │ │ │ │ │ - int * ord, │ │ │ │ │ - int  size  │ │ │ │ │ - ) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None * │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Parameters │ │ │ │ │ - u Pointer to quick sort integer array │ │ │ │ │ - ord Pointer to reordered array │ │ │ │ │ - size size of the integer array │ │ │ │ │ -***** ◆ Vnm_redirect() ***** │ │ │ │ │ -void Vnm_redirect ( const int flag ) │ │ │ │ │ -Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the │ │ │ │ │ -file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this │ │ │ │ │ -routine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - flag index for the redirect flag │ │ │ │ │ -***** ◆ Vnm_regHand() ***** │ │ │ │ │ -void Vnm_regHand ( void  ) │ │ │ │ │ -Register the signal handler with the operating system. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_setIoTag() ***** │ │ │ │ │ -void Vnm_setIoTag ( int myTag, │ │ │ │ │ - int numTags  │ │ │ │ │ - ) │ │ │ │ │ -Set my id. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - myTag index for the tag │ │ │ │ │ - numTags number of tags │ │ │ │ │ -***** ◆ Vnm_sigHand() ***** │ │ │ │ │ -void Vnm_sigHand ( int num ) │ │ │ │ │ -Handle events such as SIGINT. We must have first been registered with │ │ │ │ │ -"Vnm_signalInit". │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_sigInt() ***** │ │ │ │ │ -int Vnm_sigInt ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Return the signal interrupt flag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - Signal interrupt flag. │ │ │ │ │ -***** ◆ Vnm_sigIntClear() ***** │ │ │ │ │ -void Vnm_sigIntClear ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_sigIntSet() ***** │ │ │ │ │ -void Vnm_sigIntSet ( void  ) │ │ │ │ │ -Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ -***** ◆ Vnm_signalInit() ***** │ │ │ │ │ -jmp_buf * Vnm_signalInit ( void  ) │ │ │ │ │ -Initialize the signal handling data structures. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - the signal handling data structures │ │ │ │ │ -***** ◆ Vnm_sleep() ***** │ │ │ │ │ -void Vnm_sleep ( int nusecs ) │ │ │ │ │ -Implement a sleep function with microsecond resolution. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - This is hacked out of the "sleep_us" example in Rick Steven's Advance │ │ │ │ │ - Unix Programming book. │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - nusecs number of microseconds │ │ │ │ │ -***** ◆ Vnm_system() ***** │ │ │ │ │ -int Vnm_system ( const char * cmd ) │ │ │ │ │ -An improved ANSI-C "system" call. │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - cmd Pointer to the command │ │ │ │ │ -***** ◆ Vnm_systemBack() ***** │ │ │ │ │ -int Vnm_systemBack ( const char * cmd ) │ │ │ │ │ -A background variant of the ANSI-C "system" call. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - cmd Pointer to the command │ │ │ │ │ -***** ◆ Vnm_systemKill() ***** │ │ │ │ │ -int Vnm_systemKill ( const char * cmd ) │ │ │ │ │ -Something like a UNIX "killall" call. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - Success enumeration │ │ │ │ │ - Parameters │ │ │ │ │ - cmd Pointer to the command │ │ │ │ │ -***** ◆ Vnm_tprint() ***** │ │ │ │ │ -void Vnm_tprint ( const int  unit, │ │ │ │ │ - const char * format, │ │ │ │ │ -   ...  │ │ │ │ │ - ) │ │ │ │ │ -Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ -this routine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - For a tag to be added, both of the following conditions must hold: │ │ │ │ │ - Vnm_ioTag() >= 0 (I.e., I must have been given a tag) │ │ │ │ │ - Vnm_nTags() > 1 (I must not be the only one given a tag) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - unit index for the file unit │ │ │ │ │ - format Pointer to the print format │ │ │ │ │ -***** ◆ Vnm_tstart() ***** │ │ │ │ │ -void Vnm_tstart ( int  timer, │ │ │ │ │ - const char * name  │ │ │ │ │ - ) │ │ │ │ │ -Starts the timer on the particular machine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - timer index for the starting timer │ │ │ │ │ - name Pointer to the object │ │ │ │ │ -***** ◆ Vnm_tstop() ***** │ │ │ │ │ -void Vnm_tstop ( int  timer, │ │ │ │ │ - const char * name  │ │ │ │ │ - ) │ │ │ │ │ -Stops the timer on the particular machine. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ - Parameters │ │ │ │ │ - timer index for the starting timer │ │ │ │ │ - name Pointer to the object │ │ │ │ │ -***** ◆ Vnm_typeChk() ***** │ │ │ │ │ -void Vnm_typeChk ( void  ) │ │ │ │ │ -Check out the sizes of various datatypes. │ │ │ │ │ - Author │ │ │ │ │ - Michael Holst │ │ │ │ │ - Note │ │ │ │ │ - Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ - Returns │ │ │ │ │ - None │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00020_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vnm.h Source File │ │ │ │ +MALOC: vset.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -44,152 +44,198 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
vnm.h
│ │ │ │ +
vset.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1
│ │ │ │ -
33#ifndef _VNM_H_
│ │ │ │ -
34#define _VNM_H_
│ │ │ │ -
35
│ │ │ │ -
36#include <maloc/maloc_base.h>
│ │ │ │ -
37
│ │ │ │ -
38
│ │ │ │ -
46int Vnm_sigInt(void);
│ │ │ │ -
47
│ │ │ │ -
55void Vnm_sigIntSet(void);
│ │ │ │ -
56
│ │ │ │ -
64void Vnm_sigIntClear(void);
│ │ │ │ -
65
│ │ │ │ -
73int Vnm_jmpOk(void);
│ │ │ │ -
74
│ │ │ │ -
82void Vnm_jmpOkSet(void);
│ │ │ │ -
83
│ │ │ │ -
91void Vnm_jmpOkClear(void);
│ │ │ │ +
38#ifndef _VSET_H_
│ │ │ │ +
39#define _VSET_H_
│ │ │ │ +
40
│ │ │ │ +
41#include <maloc/maloc_base.h>
│ │ │ │ +
42
│ │ │ │ +
43#include <maloc/vnm.h>
│ │ │ │ +
44#include <maloc/vmem.h>
│ │ │ │ +
45
│ │ │ │ +
46/*
│ │ │ │ +
47 * ***************************************************************************
│ │ │ │ +
48 * Class Vset: Parameters and datatypes
│ │ │ │ +
49 * ***************************************************************************
│ │ │ │ +
50 */
│ │ │ │ +
51
│ │ │ │ +
│ │ │ │ +
57struct sVset {
│ │ │ │ +
58
│ │ │ │ + │ │ │ │ + │ │ │ │ +
63
│ │ │ │ +
65 int curT;
│ │ │ │ +
66
│ │ │ │ + │ │ │ │ +
70 int sizeT;
│ │ │ │ +
71
│ │ │ │ + │ │ │ │ +
75 int numT;
│ │ │ │ +
77 int prtT;
│ │ │ │ +
78
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
89
│ │ │ │ +
91 char **table;
│ │ │ │
92
│ │ │ │ -
100jmp_buf *Vnm_signalInit(void);
│ │ │ │ +
93};
│ │ │ │ +
│ │ │ │ +
94
│ │ │ │ +
100typedef struct sVset Vset;
│ │ │ │
101
│ │ │ │ -
109void Vnm_regHand(void);
│ │ │ │ -
110
│ │ │ │ -
119void Vnm_sigHand(int num);
│ │ │ │ -
120
│ │ │ │ -
125#define VPOW_SAFE(x,y) (Vnm_powsafe(x,y))
│ │ │ │ -
126
│ │ │ │ -
136double Vnm_powsafe(double x, double y);
│ │ │ │ +
102/****************************************************************/
│ │ │ │ +
103/* Class Vset: Inlineable method (vset.c) */
│ │ │ │ +
104/****************************************************************/
│ │ │ │ +
105
│ │ │ │ +
106#if !defined(VINLINE_MALOC)
│ │ │ │ +
115 int Vset_num(Vset *thee);
│ │ │ │ +
116
│ │ │ │ +
126 char *Vset_access(Vset *thee, int i);
│ │ │ │ +
127
│ │ │ │ +
136 char *Vset_create(Vset *thee);
│ │ │ │
137
│ │ │ │ -
145void Vnm_typeChk(void);
│ │ │ │ -
146
│ │ │ │ -
160double Vnm_epsmac(void);
│ │ │ │ -
161
│ │ │ │ -
196int Vnm_gentokens(char *buf, char **argv,
│ │ │ │ -
197 const int argvmax, const char *white, const char *comment);
│ │ │ │ -
198
│ │ │ │ -
203#define VTIMERS 100
│ │ │ │ -
204
│ │ │ │ -
214void Vnm_tstart(int timer, const char *name);
│ │ │ │ -
215
│ │ │ │ -
225void Vnm_tstop(int timer, const char *name);
│ │ │ │ -
226
│ │ │ │ -
236char *Vnm_getuser(char *user, int usermax);
│ │ │ │ -
237
│ │ │ │ -
247char *Vnm_getos(char *os, int osmax);
│ │ │ │ +
146 char *Vset_first(Vset *thee);
│ │ │ │ +
147
│ │ │ │ +
156 char *Vset_last(Vset *thee);
│ │ │ │ +
157
│ │ │ │ +
166 char *Vset_next(Vset *thee);
│ │ │ │ +
167
│ │ │ │ +
176 char *Vset_prev(Vset *thee);
│ │ │ │ +
177
│ │ │ │ +
186 char *Vset_peekFirst(Vset *thee);
│ │ │ │ +
187
│ │ │ │ +
196 char *Vset_peekLast(Vset *thee);
│ │ │ │ +
197
│ │ │ │ +
206 void Vset_destroy(Vset *thee);
│ │ │ │ +
207#else /* if defined(VINLINE_MALOC) */
│ │ │ │ +
216# define Vset_num(thee) ((thee)->numT)
│ │ │ │ +
217
│ │ │ │ +
227# define Vset_access(thee,i) ( \
│ │ │ │ +
228 ((i >= 0) && (i < thee->numT)) \
│ │ │ │ +
229 ? &((thee)->table[ (i)>>(thee)->blockPower ] \
│ │ │ │ +
230 [ (thee)->sizeT*((i)&(thee)->blockModulo) ]) \
│ │ │ │ +
231 : VNULL \
│ │ │ │ +
232 )
│ │ │ │ +
233
│ │ │ │ +
242# define Vset_create(thee) ( \
│ │ │ │ +
243 ( ((((thee)->numT)>>(thee)->blockPower) >= (thee)->numBlocks) \
│ │ │ │ +
244 || ((((thee)->numT+1)%(thee)->prtT) == 0) ) \
│ │ │ │ +
245 ? (Vset_createLast((thee))) \
│ │ │ │ +
246 : (++((thee)->numT), (Vset_access((thee),(thee)->numT-1))) \
│ │ │ │ +
247 )
│ │ │ │
248
│ │ │ │ -
258char *Vnm_gethost(char *host, int hostmax);
│ │ │ │ -
259
│ │ │ │ -
279char *Vnm_gethome(char *path, int pathmax);
│ │ │ │ -
280
│ │ │ │ -
297char *Vnm_getcwd(char *path, int pathmax);
│ │ │ │ -
298
│ │ │ │ -
307int Vnm_chdir(const char *path);
│ │ │ │ -
308
│ │ │ │ -
317int Vnm_mkdir(const char *path);
│ │ │ │ -
318
│ │ │ │ -
327int Vnm_system(const char *cmd);
│ │ │ │ +
257# define Vset_first(thee) ( \
│ │ │ │ +
258 (thee)->curT = 0, \
│ │ │ │ +
259 Vset_access((thee), (thee)->curT) \
│ │ │ │ +
260 )
│ │ │ │ +
261
│ │ │ │ +
270# define Vset_last(thee) ( \
│ │ │ │ +
271 (thee)->curT = (thee)->numT-1, \
│ │ │ │ +
272 Vset_access((thee), (thee)->curT) \
│ │ │ │ +
273 )
│ │ │ │ +
274
│ │ │ │ +
283# define Vset_next(thee) ( \
│ │ │ │ +
284 (thee)->curT++, \
│ │ │ │ +
285 ((thee)->curT < (thee)->numT) \
│ │ │ │ +
286 ? Vset_access((thee), (thee)->curT) \
│ │ │ │ +
287 : VNULL \
│ │ │ │ +
288 )
│ │ │ │ +
289
│ │ │ │ +
298# define Vset_prev(thee) ( \
│ │ │ │ +
299 (thee)->curT--, \
│ │ │ │ +
300 ((thee)->curT >= 0) \
│ │ │ │ +
301 ? Vset_access((thee), (thee)->curT) \
│ │ │ │ +
302 : VNULL \
│ │ │ │ +
303 )
│ │ │ │ +
304
│ │ │ │ +
313# define Vset_peekFirst(thee) ( \
│ │ │ │ +
314 Vset_access((thee), 0) \
│ │ │ │ +
315 )
│ │ │ │ +
316
│ │ │ │ +
325# define Vset_peekLast(thee) ( \
│ │ │ │ +
326 Vset_access((thee), (thee)->numT-1) \
│ │ │ │ +
327 )
│ │ │ │
328
│ │ │ │ -
337int Vnm_systemBack(const char *cmd);
│ │ │ │ -
338
│ │ │ │ -
347int Vnm_systemKill(const char *cmd);
│ │ │ │ -
348
│ │ │ │ -
359int Vnm_exec(int argc, char **argv);
│ │ │ │ -
360
│ │ │ │ -
371void Vnm_sleep(int nusecs);
│ │ │ │ -
372
│ │ │ │ -
380int Vnm_ioTag(void);
│ │ │ │ -
381
│ │ │ │ -
389int Vnm_nTags(void);
│ │ │ │ -
390
│ │ │ │ -
400void Vnm_setIoTag(int myTag, int numTags);
│ │ │ │ -
401
│ │ │ │ -
429FILE *Vnm_open(const int unit);
│ │ │ │ -
430
│ │ │ │ -
440int Vnm_close(const int unit);
│ │ │ │ -
441
│ │ │ │ -
451void Vnm_flush(const int unit);
│ │ │ │ -
452
│ │ │ │ -
463void Vnm_redirect(const int flag);
│ │ │ │ -
464
│ │ │ │ -
475void Vnm_print(const int unit, const char *format, ...);
│ │ │ │ -
476
│ │ │ │ -
490void Vnm_tprint(const int unit, const char *format, ...);
│ │ │ │ -
491
│ │ │ │ -
501void Vnm_qsort(int *u, int size);
│ │ │ │ -
502
│ │ │ │ -
513void Vnm_qsortOrd(int *u, int *ord, int size);
│ │ │ │ -
514
│ │ │ │ -
524void Vnm_dqsort(double *u, int size);
│ │ │ │ -
525
│ │ │ │ -
536void Vnm_dqsortOrd(double *u, int *ord, int size);
│ │ │ │ -
537
│ │ │ │ -
538#endif /* _VNM_H_ */
│ │ │ │ -
539
│ │ │ │ +
337# define Vset_destroy(thee) ( \
│ │ │ │ +
338 ( ((((thee)->numT-1)>>(thee)->blockPower) < (thee)->numBlocks-1) \
│ │ │ │ +
339 || ((thee)->numT == 1) || ((((thee)->numT)%(thee)->prtT) == 0) ) \
│ │ │ │ +
340 ? (Vset_destroyLast((thee))) : (void)(((thee)->numT)--) \
│ │ │ │ +
341 )
│ │ │ │ +
342#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ +
343
│ │ │ │ + │ │ │ │ +
357 const char *tname, int tsize, int tmaxNum, int ioKey);
│ │ │ │ +
358
│ │ │ │ +
367void Vset_dtor(Vset **thee);
│ │ │ │ +
368
│ │ │ │ + │ │ │ │ +
378
│ │ │ │ + │ │ │ │ +
388
│ │ │ │ +
397void Vset_initData(Vset *thee);
│ │ │ │ +
398
│ │ │ │ +
407void Vset_reset(Vset *thee);
│ │ │ │ +
408
│ │ │ │ +
422void Vset_check(Vset *thee,
│ │ │ │ +
423 int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd);
│ │ │ │ +
424
│ │ │ │ +
433void Vset_memChk(Vset *thee);
│ │ │ │ +
434
│ │ │ │ +
435#endif /* _VSET_H_ */
│ │ │ │ +
436
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │ -
int Vnm_mkdir(const char *path)
Interact with the system to make a new directory.
│ │ │ │ -
void Vnm_sigHand(int num)
Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".
│ │ │ │ -
int Vnm_close(const int unit)
Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ -
char * Vnm_getos(char *os, int osmax)
Ask the system for the operating system name.
│ │ │ │ -
int Vnm_ioTag(void)
Return my I/O tag.
│ │ │ │ -
void Vnm_print(const int unit, const char *format,...)
External interface to the console i/o routine. We MUST NOT use VASSERT (or Vnm_print!...
│ │ │ │ -
void Vnm_setIoTag(int myTag, int numTags)
Set my id.
│ │ │ │ -
double Vnm_powsafe(double x, double y)
A safe VPOW function (avoids division by zero).
│ │ │ │ -
void Vnm_qsortOrd(int *u, int *ord, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
int Vnm_nTags(void)
Return the total number of tags.
│ │ │ │ -
void Vnm_sigIntClear(void)
Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ -
void Vnm_flush(const int unit)
Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ -
FILE * Vnm_open(const int unit)
Open an I/O console.
│ │ │ │ -
int Vnm_sigInt(void)
Signal and setjmp handling routine. Return the signal interrupt flag.
│ │ │ │ -
int Vnm_system(const char *cmd)
An improved ANSI-C "system" call.
│ │ │ │ -
int Vnm_exec(int argc, char **argv)
An improved UNIX "exec" call. This routine does not return except on error.
│ │ │ │ -
void Vnm_dqsortOrd(double *u, int *ord, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
void Vnm_jmpOkSet(void)
Signal and setjmp handling routine. Set the "okay-to-jump" flag.
│ │ │ │ -
void Vnm_tstart(int timer, const char *name)
Starts the timer on the particular machine.
│ │ │ │ -
char * Vnm_gethost(char *host, int hostmax)
Ask the system for the hostname.
│ │ │ │ -
void Vnm_sleep(int nusecs)
Implement a sleep function with microsecond resolution.
│ │ │ │ -
void Vnm_jmpOkClear(void)
Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ -
jmp_buf * Vnm_signalInit(void)
Initialize the signal handling data structures.
│ │ │ │ -
int Vnm_chdir(const char *path)
Interact with the system to change the working directory.
│ │ │ │ -
void Vnm_typeChk(void)
Check out the sizes of various datatypes.
│ │ │ │ -
int Vnm_jmpOk(void)
Signal and setjmp handling routine. Return the "ok-to-jump" flag.
│ │ │ │ -
void Vnm_tprint(const int unit, const char *format,...)
Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ -
char * Vnm_gethome(char *path, int pathmax)
Ask the system for the home directory.
│ │ │ │ -
double Vnm_epsmac(void)
Computes the unit roundoff of the machine in single precision. This is defined as the smallest posi...
│ │ │ │ -
int Vnm_systemBack(const char *cmd)
A background variant of the ANSI-C "system" call.
│ │ │ │ -
int Vnm_gentokens(char *buf, char **argv, const int argvmax, const char *white, const char *comment)
Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens ...
│ │ │ │ -
int Vnm_systemKill(const char *cmd)
Something like a UNIX "killall" call.
│ │ │ │ -
void Vnm_qsort(int *u, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
void Vnm_sigIntSet(void)
Signal and setjmp handling routine. Set the signal interrupt flag.
│ │ │ │ -
void Vnm_redirect(const int flag)
Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io....
│ │ │ │ -
char * Vnm_getcwd(char *path, int pathmax)
Ask the system for the current working directory.
│ │ │ │ -
char * Vnm_getuser(char *user, int usermax)
Ask the system for the username.
│ │ │ │ -
void Vnm_regHand(void)
Register the signal handler with the operating system.
│ │ │ │ -
void Vnm_dqsort(double *u, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ -
void Vnm_tstop(int timer, const char *name)
Stops the timer on the particular machine.
│ │ │ │ +
#define VMAX_ARGLEN
Global constant.
Definition maloc_base.h:227
│ │ │ │ +
Header file for an ISO C [V]irtual [N]umerical [M]achine.
│ │ │ │ +
Class Vmem: A safer, object-oriented, malloc/free object.
│ │ │ │ +
char * Vset_peekFirst(Vset *thee)
Return the first object in the set.
│ │ │ │ +
char * Vset_prev(Vset *thee)
Return the prev object in the set.
│ │ │ │ +
void Vset_dtor(Vset **thee)
Destroy the set object.
│ │ │ │ +
char * Vset_first(Vset *thee)
Return the first object in the set.
│ │ │ │ +
Vset * Vset_ctor(Vmem *vmem, const char *tname, int tsize, int tmaxNum, int ioKey)
Construct the set object.
│ │ │ │ +
void Vset_reset(Vset *thee)
Release all Ram controlled by this (thee) and re-initialize.
│ │ │ │ +
char * Vset_next(Vset *thee)
Return the next object in the set.
│ │ │ │ +
void Vset_initData(Vset *thee)
Initialize the Vset data (thee).
│ │ │ │ +
void Vset_destroyLast(Vset *thee)
Free up the object currently on the end of the list.
│ │ │ │ +
char * Vset_create(Vset *thee)
Create an object on the end of the list.
│ │ │ │ +
void Vset_memChk(Vset *thee)
Print the exact current malloc usage.
│ │ │ │ +
void Vset_check(Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd)
Get and return the RAM Control Block (thee) information.
│ │ │ │ +
int Vset_num(Vset *thee)
Return the number of things currently in the list.
│ │ │ │ +
char * Vset_peekLast(Vset *thee)
Return the last object in the set.
│ │ │ │ +
char * Vset_last(Vset *thee)
Return the last object in the set.
│ │ │ │ +
void Vset_destroy(Vset *thee)
Delete an object from the end of the list.
│ │ │ │ +
char * Vset_createLast(Vset *thee)
Create an object on the end of the list.
│ │ │ │ +
char * Vset_access(Vset *thee, int i)
Access an object in an arbitrary place in the list.
│ │ │ │ +
Contains public data members for Vmem class.
Definition vmem.h:57
│ │ │ │ +
Contains public data members for Vset class.
Definition vset.h:57
│ │ │ │ +
int blockModulo
=blockSize-1; for determining which block fast
Definition vset.h:88
│ │ │ │ +
char nameT[VMAX_ARGLEN]
name of object we are managing
Definition vset.h:68
│ │ │ │ +
int iMadeVmem
did i make vmem or was it inherited
Definition vset.h:62
│ │ │ │ +
int blockSize
blocksize is 2^(blockPower)
Definition vset.h:84
│ │ │ │ +
char ** table
list of pointers to blocks of storage we manage
Definition vset.h:91
│ │ │ │ +
int numBlocks
total number of allocated blocks
Definition vset.h:73
│ │ │ │ +
int prtT
for i/o at appropriate block creation/deletion
Definition vset.h:77
│ │ │ │ +
Vmem * vmem
the memory manager
Definition vset.h:60
│ │ │ │ +
int curT
the current "T" object in our collection
Definition vset.h:65
│ │ │ │ +
int blockMax
num blocks = blockMax=(maxObjects/blockSize)
Definition vset.h:86
│ │ │ │ +
int sizeT
size of the object in bytes
Definition vset.h:70
│ │ │ │ +
int blockPower
power of 2 for blocksize (e.g., =10, or =16)
Definition vset.h:82
│ │ │ │ +
int maxObjects
number of objects to manage (user specified)
Definition vset.h:80
│ │ │ │ +
int numT
the global "T" counter – how many "T"s in list
Definition vset.h:75
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -us-ascii │ │ │ │ │ +utf-8 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,236 +3,283 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * vsys │ │ │ │ │ * maloc │ │ │ │ │ -vnm.h │ │ │ │ │ +vset.h │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ 1 │ │ │ │ │ - 33#ifndef _VNM_H_ │ │ │ │ │ - 34#define _VNM_H_ │ │ │ │ │ - 35 │ │ │ │ │ - 36#include │ │ │ │ │ - 37 │ │ │ │ │ - 38 │ │ │ │ │ -46int Vnm_sigInt(void); │ │ │ │ │ - 47 │ │ │ │ │ -55void Vnm_sigIntSet(void); │ │ │ │ │ - 56 │ │ │ │ │ -64void Vnm_sigIntClear(void); │ │ │ │ │ - 65 │ │ │ │ │ -73int Vnm_jmpOk(void); │ │ │ │ │ - 74 │ │ │ │ │ -82void Vnm_jmpOkSet(void); │ │ │ │ │ - 83 │ │ │ │ │ -91void Vnm_jmpOkClear(void); │ │ │ │ │ + 38#ifndef _VSET_H_ │ │ │ │ │ + 39#define _VSET_H_ │ │ │ │ │ + 40 │ │ │ │ │ + 41#include │ │ │ │ │ + 42 │ │ │ │ │ + 43#include │ │ │ │ │ + 44#include │ │ │ │ │ + 45 │ │ │ │ │ + 46/* │ │ │ │ │ + 47 * │ │ │ │ │ +*************************************************************************** │ │ │ │ │ + 48 * Class Vset: Parameters and datatypes │ │ │ │ │ + 49 * │ │ │ │ │ +*************************************************************************** │ │ │ │ │ + 50 */ │ │ │ │ │ + 51 │ │ │ │ │ +57struct sVset { │ │ │ │ │ + 58 │ │ │ │ │ +60 Vmem *vmem; │ │ │ │ │ +62 int iMadeVmem; │ │ │ │ │ + 63 │ │ │ │ │ +65 int curT; │ │ │ │ │ + 66 │ │ │ │ │ +68 char nameT[VMAX_ARGLEN]; │ │ │ │ │ +70 int sizeT; │ │ │ │ │ + 71 │ │ │ │ │ +73 int numBlocks; │ │ │ │ │ +75 int numT; │ │ │ │ │ +77 int prtT; │ │ │ │ │ + 78 │ │ │ │ │ +80 int maxObjects; │ │ │ │ │ +82 int blockPower; │ │ │ │ │ +84 int blockSize; │ │ │ │ │ +86 int blockMax; │ │ │ │ │ +88 int blockModulo; │ │ │ │ │ + 89 │ │ │ │ │ +91 char **table; │ │ │ │ │ 92 │ │ │ │ │ -100jmp_buf *Vnm_signalInit(void); │ │ │ │ │ + 93}; │ │ │ │ │ + 94 │ │ │ │ │ +100typedef struct sVset Vset; │ │ │ │ │ 101 │ │ │ │ │ -109void Vnm_regHand(void); │ │ │ │ │ - 110 │ │ │ │ │ -119void Vnm_sigHand(int num); │ │ │ │ │ - 120 │ │ │ │ │ -125#define VPOW_SAFE(x,y) (Vnm_powsafe(x,y)) │ │ │ │ │ - 126 │ │ │ │ │ -136double Vnm_powsafe(double x, double y); │ │ │ │ │ + 102/****************************************************************/ │ │ │ │ │ + 103/* Class Vset: Inlineable method (vset.c) */ │ │ │ │ │ + 104/****************************************************************/ │ │ │ │ │ + 105 │ │ │ │ │ + 106#if !defined(VINLINE_MALOC) │ │ │ │ │ +115 int Vset_num(Vset *thee); │ │ │ │ │ + 116 │ │ │ │ │ +126 char *Vset_access(Vset *thee, int i); │ │ │ │ │ + 127 │ │ │ │ │ +136 char *Vset_create(Vset *thee); │ │ │ │ │ 137 │ │ │ │ │ -145void Vnm_typeChk(void); │ │ │ │ │ - 146 │ │ │ │ │ -160double Vnm_epsmac(void); │ │ │ │ │ - 161 │ │ │ │ │ -196int Vnm_gentokens(char *buf, char **argv, │ │ │ │ │ - 197 const int argvmax, const char *white, const char *comment); │ │ │ │ │ - 198 │ │ │ │ │ -203#define VTIMERS 100 │ │ │ │ │ - 204 │ │ │ │ │ -214void Vnm_tstart(int timer, const char *name); │ │ │ │ │ - 215 │ │ │ │ │ -225void Vnm_tstop(int timer, const char *name); │ │ │ │ │ - 226 │ │ │ │ │ -236char *Vnm_getuser(char *user, int usermax); │ │ │ │ │ - 237 │ │ │ │ │ -247char *Vnm_getos(char *os, int osmax); │ │ │ │ │ +146 char *Vset_first(Vset *thee); │ │ │ │ │ + 147 │ │ │ │ │ +156 char *Vset_last(Vset *thee); │ │ │ │ │ + 157 │ │ │ │ │ +166 char *Vset_next(Vset *thee); │ │ │ │ │ + 167 │ │ │ │ │ +176 char *Vset_prev(Vset *thee); │ │ │ │ │ + 177 │ │ │ │ │ +186 char *Vset_peekFirst(Vset *thee); │ │ │ │ │ + 187 │ │ │ │ │ +196 char *Vset_peekLast(Vset *thee); │ │ │ │ │ + 197 │ │ │ │ │ +206 void Vset_destroy(Vset *thee); │ │ │ │ │ + 207#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ + 216# define Vset_num(thee) ((thee)->numT) │ │ │ │ │ + 217 │ │ │ │ │ + 227# define Vset_access(thee,i) ( \ │ │ │ │ │ + 228 ((i >= 0) && (i < thee->numT)) \ │ │ │ │ │ + 229 ? &((thee)->table[ (i)>>(thee)->blockPower ] \ │ │ │ │ │ + 230 [ (thee)->sizeT*((i)&(thee)->blockModulo) ]) \ │ │ │ │ │ + 231 : VNULL \ │ │ │ │ │ + 232 ) │ │ │ │ │ + 233 │ │ │ │ │ + 242# define Vset_create(thee) ( \ │ │ │ │ │ + 243 ( ((((thee)->numT)>>(thee)->blockPower) >= (thee)->numBlocks) \ │ │ │ │ │ + 244 || ((((thee)->numT+1)%(thee)->prtT) == 0) ) \ │ │ │ │ │ + 245 ? (Vset_createLast((thee))) \ │ │ │ │ │ + 246 : (++((thee)->numT), (Vset_access((thee),(thee)->numT-1))) \ │ │ │ │ │ + 247 ) │ │ │ │ │ 248 │ │ │ │ │ -258char *Vnm_gethost(char *host, int hostmax); │ │ │ │ │ - 259 │ │ │ │ │ -279char *Vnm_gethome(char *path, int pathmax); │ │ │ │ │ - 280 │ │ │ │ │ -297char *Vnm_getcwd(char *path, int pathmax); │ │ │ │ │ - 298 │ │ │ │ │ -307int Vnm_chdir(const char *path); │ │ │ │ │ - 308 │ │ │ │ │ -317int Vnm_mkdir(const char *path); │ │ │ │ │ - 318 │ │ │ │ │ -327int Vnm_system(const char *cmd); │ │ │ │ │ + 257# define Vset_first(thee) ( \ │ │ │ │ │ + 258 (thee)->curT = 0, \ │ │ │ │ │ + 259 Vset_access((thee), (thee)->curT) \ │ │ │ │ │ + 260 ) │ │ │ │ │ + 261 │ │ │ │ │ + 270# define Vset_last(thee) ( \ │ │ │ │ │ + 271 (thee)->curT = (thee)->numT-1, \ │ │ │ │ │ + 272 Vset_access((thee), (thee)->curT) \ │ │ │ │ │ + 273 ) │ │ │ │ │ + 274 │ │ │ │ │ + 283# define Vset_next(thee) ( \ │ │ │ │ │ + 284 (thee)->curT++, \ │ │ │ │ │ + 285 ((thee)->curT < (thee)->numT) \ │ │ │ │ │ + 286 ? Vset_access((thee), (thee)->curT) \ │ │ │ │ │ + 287 : VNULL \ │ │ │ │ │ + 288 ) │ │ │ │ │ + 289 │ │ │ │ │ + 298# define Vset_prev(thee) ( \ │ │ │ │ │ + 299 (thee)->curT--, \ │ │ │ │ │ + 300 ((thee)->curT >= 0) \ │ │ │ │ │ + 301 ? Vset_access((thee), (thee)->curT) \ │ │ │ │ │ + 302 : VNULL \ │ │ │ │ │ + 303 ) │ │ │ │ │ + 304 │ │ │ │ │ + 313# define Vset_peekFirst(thee) ( \ │ │ │ │ │ + 314 Vset_access((thee), 0) \ │ │ │ │ │ + 315 ) │ │ │ │ │ + 316 │ │ │ │ │ + 325# define Vset_peekLast(thee) ( \ │ │ │ │ │ + 326 Vset_access((thee), (thee)->numT-1) \ │ │ │ │ │ + 327 ) │ │ │ │ │ 328 │ │ │ │ │ -337int Vnm_systemBack(const char *cmd); │ │ │ │ │ - 338 │ │ │ │ │ -347int Vnm_systemKill(const char *cmd); │ │ │ │ │ - 348 │ │ │ │ │ -359int Vnm_exec(int argc, char **argv); │ │ │ │ │ - 360 │ │ │ │ │ -371void Vnm_sleep(int nusecs); │ │ │ │ │ - 372 │ │ │ │ │ -380int Vnm_ioTag(void); │ │ │ │ │ - 381 │ │ │ │ │ -389int Vnm_nTags(void); │ │ │ │ │ - 390 │ │ │ │ │ -400void Vnm_setIoTag(int myTag, int numTags); │ │ │ │ │ - 401 │ │ │ │ │ -429FILE *Vnm_open(const int unit); │ │ │ │ │ - 430 │ │ │ │ │ -440int Vnm_close(const int unit); │ │ │ │ │ - 441 │ │ │ │ │ -451void Vnm_flush(const int unit); │ │ │ │ │ - 452 │ │ │ │ │ -463void Vnm_redirect(const int flag); │ │ │ │ │ - 464 │ │ │ │ │ -475void Vnm_print(const int unit, const char *format, ...); │ │ │ │ │ - 476 │ │ │ │ │ -490void Vnm_tprint(const int unit, const char *format, ...); │ │ │ │ │ - 491 │ │ │ │ │ -501void Vnm_qsort(int *u, int size); │ │ │ │ │ - 502 │ │ │ │ │ -513void Vnm_qsortOrd(int *u, int *ord, int size); │ │ │ │ │ - 514 │ │ │ │ │ -524void Vnm_dqsort(double *u, int size); │ │ │ │ │ - 525 │ │ │ │ │ -536void Vnm_dqsortOrd(double *u, int *ord, int size); │ │ │ │ │ - 537 │ │ │ │ │ - 538#endif /* _VNM_H_ */ │ │ │ │ │ - 539 │ │ │ │ │ + 337# define Vset_destroy(thee) ( \ │ │ │ │ │ + 338 ( ((((thee)->numT-1)>>(thee)->blockPower) < (thee)->numBlocks-1) \ │ │ │ │ │ + 339 || ((thee)->numT == 1) || ((((thee)->numT)%(thee)->prtT) == 0) ) \ │ │ │ │ │ + 340 ? (Vset_destroyLast((thee))) : (void)(((thee)->numT)--) \ │ │ │ │ │ + 341 ) │ │ │ │ │ + 342#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ + 343 │ │ │ │ │ +356Vset* Vset_ctor(Vmem *vmem, │ │ │ │ │ + 357 const char *tname, int tsize, int tmaxNum, int ioKey); │ │ │ │ │ + 358 │ │ │ │ │ +367void Vset_dtor(Vset **thee); │ │ │ │ │ + 368 │ │ │ │ │ +377char *Vset_createLast(Vset *thee); │ │ │ │ │ + 378 │ │ │ │ │ +387void Vset_destroyLast(Vset *thee); │ │ │ │ │ + 388 │ │ │ │ │ +397void Vset_initData(Vset *thee); │ │ │ │ │ + 398 │ │ │ │ │ +407void Vset_reset(Vset *thee); │ │ │ │ │ + 408 │ │ │ │ │ +422void Vset_check(Vset *thee, │ │ │ │ │ + 423 int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd); │ │ │ │ │ + 424 │ │ │ │ │ +433void Vset_memChk(Vset *thee); │ │ │ │ │ + 434 │ │ │ │ │ + 435#endif /* _VSET_H_ */ │ │ │ │ │ + 436 │ │ │ │ │ maloc_base.h │ │ │ │ │ The base (or foundation) header for MALOC. │ │ │ │ │ -Vnm_mkdir │ │ │ │ │ -int Vnm_mkdir(const char *path) │ │ │ │ │ -Interact with the system to make a new directory. │ │ │ │ │ -Vnm_sigHand │ │ │ │ │ -void Vnm_sigHand(int num) │ │ │ │ │ -Handle events such as SIGINT. We must have first been registered with │ │ │ │ │ -"Vnm_signalInit". │ │ │ │ │ -Vnm_close │ │ │ │ │ -int Vnm_close(const int unit) │ │ │ │ │ -Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ -Vnm_getos │ │ │ │ │ -char * Vnm_getos(char *os, int osmax) │ │ │ │ │ -Ask the system for the operating system name. │ │ │ │ │ -Vnm_ioTag │ │ │ │ │ -int Vnm_ioTag(void) │ │ │ │ │ -Return my I/O tag. │ │ │ │ │ -Vnm_print │ │ │ │ │ -void Vnm_print(const int unit, const char *format,...) │ │ │ │ │ -External interface to the console i/o routine. We MUST NOT use VASSERT (or │ │ │ │ │ -Vnm_print!... │ │ │ │ │ -Vnm_setIoTag │ │ │ │ │ -void Vnm_setIoTag(int myTag, int numTags) │ │ │ │ │ -Set my id. │ │ │ │ │ -Vnm_powsafe │ │ │ │ │ -double Vnm_powsafe(double x, double y) │ │ │ │ │ -A safe VPOW function (avoids division by zero). │ │ │ │ │ -Vnm_qsortOrd │ │ │ │ │ -void Vnm_qsortOrd(int *u, int *ord, int size) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ -Vnm_nTags │ │ │ │ │ -int Vnm_nTags(void) │ │ │ │ │ -Return the total number of tags. │ │ │ │ │ -Vnm_sigIntClear │ │ │ │ │ -void Vnm_sigIntClear(void) │ │ │ │ │ -Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │ -Vnm_flush │ │ │ │ │ -void Vnm_flush(const int unit) │ │ │ │ │ -Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or │ │ │ │ │ -Vnm_print!) in this routine. │ │ │ │ │ -Vnm_open │ │ │ │ │ -FILE * Vnm_open(const int unit) │ │ │ │ │ -Open an I/O console. │ │ │ │ │ -Vnm_sigInt │ │ │ │ │ -int Vnm_sigInt(void) │ │ │ │ │ -Signal and setjmp handling routine. Return the signal interrupt flag. │ │ │ │ │ -Vnm_system │ │ │ │ │ -int Vnm_system(const char *cmd) │ │ │ │ │ -An improved ANSI-C "system" call. │ │ │ │ │ -Vnm_exec │ │ │ │ │ -int Vnm_exec(int argc, char **argv) │ │ │ │ │ -An improved UNIX "exec" call. This routine does not return except on error. │ │ │ │ │ -Vnm_dqsortOrd │ │ │ │ │ -void Vnm_dqsortOrd(double *u, int *ord, int size) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ -Vnm_jmpOkSet │ │ │ │ │ -void Vnm_jmpOkSet(void) │ │ │ │ │ -Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ -Vnm_tstart │ │ │ │ │ -void Vnm_tstart(int timer, const char *name) │ │ │ │ │ -Starts the timer on the particular machine. │ │ │ │ │ -Vnm_gethost │ │ │ │ │ -char * Vnm_gethost(char *host, int hostmax) │ │ │ │ │ -Ask the system for the hostname. │ │ │ │ │ -Vnm_sleep │ │ │ │ │ -void Vnm_sleep(int nusecs) │ │ │ │ │ -Implement a sleep function with microsecond resolution. │ │ │ │ │ -Vnm_jmpOkClear │ │ │ │ │ -void Vnm_jmpOkClear(void) │ │ │ │ │ -Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ -Vnm_signalInit │ │ │ │ │ -jmp_buf * Vnm_signalInit(void) │ │ │ │ │ -Initialize the signal handling data structures. │ │ │ │ │ -Vnm_chdir │ │ │ │ │ -int Vnm_chdir(const char *path) │ │ │ │ │ -Interact with the system to change the working directory. │ │ │ │ │ -Vnm_typeChk │ │ │ │ │ -void Vnm_typeChk(void) │ │ │ │ │ -Check out the sizes of various datatypes. │ │ │ │ │ -Vnm_jmpOk │ │ │ │ │ -int Vnm_jmpOk(void) │ │ │ │ │ -Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ -Vnm_tprint │ │ │ │ │ -void Vnm_tprint(const int unit, const char *format,...) │ │ │ │ │ -Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ -this routine. │ │ │ │ │ -Vnm_gethome │ │ │ │ │ -char * Vnm_gethome(char *path, int pathmax) │ │ │ │ │ -Ask the system for the home directory. │ │ │ │ │ -Vnm_epsmac │ │ │ │ │ -double Vnm_epsmac(void) │ │ │ │ │ -Computes the unit roundoff of the machine in single precision. This is defined │ │ │ │ │ -as the smallest posi... │ │ │ │ │ -Vnm_systemBack │ │ │ │ │ -int Vnm_systemBack(const char *cmd) │ │ │ │ │ -A background variant of the ANSI-C "system" call. │ │ │ │ │ -Vnm_gentokens │ │ │ │ │ -int Vnm_gentokens(char *buf, char **argv, const int argvmax, const char *white, │ │ │ │ │ -const char *comment) │ │ │ │ │ -Generate an [argv,argc] pair from a character string "buf" (assumed NULL- │ │ │ │ │ -terminated) in which tokens ... │ │ │ │ │ -Vnm_systemKill │ │ │ │ │ -int Vnm_systemKill(const char *cmd) │ │ │ │ │ -Something like a UNIX "killall" call. │ │ │ │ │ -Vnm_qsort │ │ │ │ │ -void Vnm_qsort(int *u, int size) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ -Vnm_sigIntSet │ │ │ │ │ -void Vnm_sigIntSet(void) │ │ │ │ │ -Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │ -Vnm_redirect │ │ │ │ │ -void Vnm_redirect(const int flag) │ │ │ │ │ -Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the │ │ │ │ │ -file: ${MCSH_HOME}/io.... │ │ │ │ │ -Vnm_getcwd │ │ │ │ │ -char * Vnm_getcwd(char *path, int pathmax) │ │ │ │ │ -Ask the system for the current working directory. │ │ │ │ │ -Vnm_getuser │ │ │ │ │ -char * Vnm_getuser(char *user, int usermax) │ │ │ │ │ -Ask the system for the username. │ │ │ │ │ -Vnm_regHand │ │ │ │ │ -void Vnm_regHand(void) │ │ │ │ │ -Register the signal handler with the operating system. │ │ │ │ │ -Vnm_dqsort │ │ │ │ │ -void Vnm_dqsort(double *u, int size) │ │ │ │ │ -Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ -Vnm_tstop │ │ │ │ │ -void Vnm_tstop(int timer, const char *name) │ │ │ │ │ -Stops the timer on the particular machine. │ │ │ │ │ +VMAX_ARGLEN │ │ │ │ │ +#define VMAX_ARGLEN │ │ │ │ │ +Global constant. │ │ │ │ │ +Definition maloc_base.h:227 │ │ │ │ │ +vnm.h │ │ │ │ │ +Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ │ +vmem.h │ │ │ │ │ +Class Vmem: A safer, object-oriented, malloc/free object. │ │ │ │ │ +Vset_peekFirst │ │ │ │ │ +char * Vset_peekFirst(Vset *thee) │ │ │ │ │ +Return the first object in the set. │ │ │ │ │ +Vset_prev │ │ │ │ │ +char * Vset_prev(Vset *thee) │ │ │ │ │ +Return the prev object in the set. │ │ │ │ │ +Vset_dtor │ │ │ │ │ +void Vset_dtor(Vset **thee) │ │ │ │ │ +Destroy the set object. │ │ │ │ │ +Vset_first │ │ │ │ │ +char * Vset_first(Vset *thee) │ │ │ │ │ +Return the first object in the set. │ │ │ │ │ +Vset_ctor │ │ │ │ │ +Vset * Vset_ctor(Vmem *vmem, const char *tname, int tsize, int tmaxNum, int │ │ │ │ │ +ioKey) │ │ │ │ │ +Construct the set object. │ │ │ │ │ +Vset_reset │ │ │ │ │ +void Vset_reset(Vset *thee) │ │ │ │ │ +Release all Ram controlled by this (thee) and re-initialize. │ │ │ │ │ +Vset_next │ │ │ │ │ +char * Vset_next(Vset *thee) │ │ │ │ │ +Return the next object in the set. │ │ │ │ │ +Vset_initData │ │ │ │ │ +void Vset_initData(Vset *thee) │ │ │ │ │ +Initialize the Vset data (thee). │ │ │ │ │ +Vset_destroyLast │ │ │ │ │ +void Vset_destroyLast(Vset *thee) │ │ │ │ │ +Free up the object currently on the end of the list. │ │ │ │ │ +Vset_create │ │ │ │ │ +char * Vset_create(Vset *thee) │ │ │ │ │ +Create an object on the end of the list. │ │ │ │ │ +Vset_memChk │ │ │ │ │ +void Vset_memChk(Vset *thee) │ │ │ │ │ +Print the exact current malloc usage. │ │ │ │ │ +Vset_check │ │ │ │ │ +void Vset_check(Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, │ │ │ │ │ +int *tVecOhd) │ │ │ │ │ +Get and return the RAM Control Block (thee) information. │ │ │ │ │ +Vset_num │ │ │ │ │ +int Vset_num(Vset *thee) │ │ │ │ │ +Return the number of things currently in the list. │ │ │ │ │ +Vset_peekLast │ │ │ │ │ +char * Vset_peekLast(Vset *thee) │ │ │ │ │ +Return the last object in the set. │ │ │ │ │ +Vset_last │ │ │ │ │ +char * Vset_last(Vset *thee) │ │ │ │ │ +Return the last object in the set. │ │ │ │ │ +Vset_destroy │ │ │ │ │ +void Vset_destroy(Vset *thee) │ │ │ │ │ +Delete an object from the end of the list. │ │ │ │ │ +Vset_createLast │ │ │ │ │ +char * Vset_createLast(Vset *thee) │ │ │ │ │ +Create an object on the end of the list. │ │ │ │ │ +Vset_access │ │ │ │ │ +char * Vset_access(Vset *thee, int i) │ │ │ │ │ +Access an object in an arbitrary place in the list. │ │ │ │ │ +sVmem │ │ │ │ │ +Contains public data members for Vmem class. │ │ │ │ │ +Definition vmem.h:57 │ │ │ │ │ +sVset │ │ │ │ │ +Contains public data members for Vset class. │ │ │ │ │ +Definition vset.h:57 │ │ │ │ │ +sVset::blockModulo │ │ │ │ │ +int blockModulo │ │ │ │ │ +=blockSize-1; for determining which block fast │ │ │ │ │ +Definition vset.h:88 │ │ │ │ │ +sVset::nameT │ │ │ │ │ +char nameT[VMAX_ARGLEN] │ │ │ │ │ +name of object we are managing │ │ │ │ │ +Definition vset.h:68 │ │ │ │ │ +sVset::iMadeVmem │ │ │ │ │ +int iMadeVmem │ │ │ │ │ +did i make vmem or was it inherited │ │ │ │ │ +Definition vset.h:62 │ │ │ │ │ +sVset::blockSize │ │ │ │ │ +int blockSize │ │ │ │ │ +blocksize is 2^(blockPower) │ │ │ │ │ +Definition vset.h:84 │ │ │ │ │ +sVset::table │ │ │ │ │ +char ** table │ │ │ │ │ +list of pointers to blocks of storage we manage │ │ │ │ │ +Definition vset.h:91 │ │ │ │ │ +sVset::numBlocks │ │ │ │ │ +int numBlocks │ │ │ │ │ +total number of allocated blocks │ │ │ │ │ +Definition vset.h:73 │ │ │ │ │ +sVset::prtT │ │ │ │ │ +int prtT │ │ │ │ │ +for i/o at appropriate block creation/deletion │ │ │ │ │ +Definition vset.h:77 │ │ │ │ │ +sVset::vmem │ │ │ │ │ +Vmem * vmem │ │ │ │ │ +the memory manager │ │ │ │ │ +Definition vset.h:60 │ │ │ │ │ +sVset::curT │ │ │ │ │ +int curT │ │ │ │ │ +the current "T" object in our collection │ │ │ │ │ +Definition vset.h:65 │ │ │ │ │ +sVset::blockMax │ │ │ │ │ +int blockMax │ │ │ │ │ +num blocks = blockMax=(maxObjects/blockSize) │ │ │ │ │ +Definition vset.h:86 │ │ │ │ │ +sVset::sizeT │ │ │ │ │ +int sizeT │ │ │ │ │ +size of the object in bytes │ │ │ │ │ +Definition vset.h:70 │ │ │ │ │ +sVset::blockPower │ │ │ │ │ +int blockPower │ │ │ │ │ +power of 2 for blocksize (e.g., =10, or =16) │ │ │ │ │ +Definition vset.h:82 │ │ │ │ │ +sVset::maxObjects │ │ │ │ │ +int maxObjects │ │ │ │ │ +number of objects to manage (user specified) │ │ │ │ │ +Definition vset.h:80 │ │ │ │ │ +sVset::numT │ │ │ │ │ +int numT │ │ │ │ │ +the global "T" counter – how many "T"s in list │ │ │ │ │ +Definition vset.h:75 │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00021.dot.gz │ │ │ │ ├── a00021.dot │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ -digraph "vnm.h" │ │ │ │ │ +digraph "vset.h" │ │ │ │ │ { │ │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ │ bgcolor="transparent"; │ │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ │ - Node1 [id="Node000001",label="vnm.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node1 [id="Node000001",label="vset.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc/maloc_base.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00002.html",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="assert.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node4 [id="Node000004",label="ctype.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ @@ -33,8 +33,14 @@ │ │ │ │ │ Node14 [id="Node000014",label="stdlib.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node15 [id="edge14_Node000002_Node000015",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node15 [id="Node000015",label="string.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node16 [id="edge15_Node000002_Node000016",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ + Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node18 [id="Node000018",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ + Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node1 -> Node19 [id="edge19_Node000001_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ + Node19 [id="Node000019",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ + Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00022.dot │ │ │ │ @@ -1,34 +1,28 @@ │ │ │ │ -digraph "vnm.h" │ │ │ │ +digraph "vset.h" │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ - Node1 [id="Node000001",label="vnm.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ + Node1 [id="Node000001",label="vset.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00032.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ + Node2 [id="Node000002",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 [id="Node000003",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ - Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ - Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node5 [id="Node000005",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ - Node5 -> Node4 [id="edge5_Node000005_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 -> Node6 [id="edge6_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node6 [id="Node000006",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ - Node6 -> Node7 [id="edge7_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node7 [id="Node000007",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ - Node7 -> Node5 [id="edge8_Node000007_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 -> Node7 [id="edge9_Node000003_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 -> Node8 [id="edge10_Node000003_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ - Node8 -> Node7 [id="edge11_Node000008_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 -> Node9 [id="edge12_Node000003_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node9 [id="Node000009",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ - Node9 -> Node4 [id="edge13_Node000009_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node9 -> Node5 [id="edge14_Node000009_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node1 -> Node10 [id="edge15_Node000001_Node000010",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node10 [id="Node000010",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ - Node10 -> Node3 [id="edge16_Node000010_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node1 -> Node3 [id="edge17_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 [id="Node000003",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ + Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node4 [id="Node000004",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ + Node4 -> Node3 [id="edge4_Node000004_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node2 -> Node5 [id="edge5_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node5 [id="Node000005",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ + Node5 -> Node6 [id="edge6_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node6 [id="Node000006",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node6 -> Node4 [id="edge7_Node000006_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node2 -> Node6 [id="edge8_Node000002_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node2 -> Node7 [id="edge9_Node000002_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node7 [id="Node000007",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ + Node7 -> Node6 [id="edge10_Node000007_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node2 -> Node8 [id="edge11_Node000002_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node8 [id="Node000008",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ + Node8 -> Node3 [id="edge12_Node000008_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node8 -> Node4 [id="edge13_Node000008_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00023.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vset.h File Reference │ │ │ │ +MALOC: vnm.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -40,116 +40,190 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ -Classes | │ │ │ │ -Typedefs | │ │ │ │ +Macros | │ │ │ │ Functions
│ │ │ │ -
vset.h File Reference
│ │ │ │ +
vnm.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Class Vset: a dynamic set object. │ │ │ │ +

Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ -#include <maloc/vnm.h>
│ │ │ │ -#include <maloc/vmem.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vset.h:
│ │ │ │ +Include dependency graph for vnm.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -

│ │ │ │ -Classes

struct  sVset
 Contains public data members for Vset class. More...
 
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ -Typedefs

typedef struct sVset Vset
 Declaration of the Vset class as the Vset structure.
 

│ │ │ │ +Macros

#define VPOW_SAFE(x, y)   (Vnm_powsafe(x,y))
 A safe VPOW function (avoids division by zero)
 
#define VTIMERS   100
 the maiximal timer constant
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

int Vset_num (Vset *thee)
 Return the number of things currently in the list.
 
char * Vset_access (Vset *thee, int i)
 Access an object in an arbitrary place in the list.
 
char * Vset_create (Vset *thee)
 Create an object on the end of the list.
│ │ │ │ -
 
char * Vset_first (Vset *thee)
 Return the first object in the set.
│ │ │ │ -
 
char * Vset_last (Vset *thee)
 Return the last object in the set.
 
char * Vset_next (Vset *thee)
 Return the next object in the set.
 
char * Vset_prev (Vset *thee)
 Return the prev object in the set.
 
char * Vset_peekFirst (Vset *thee)
 Return the first object in the set.
 
char * Vset_peekLast (Vset *thee)
 Return the last object in the set.
 
void Vset_destroy (Vset *thee)
 Delete an object from the end of the list.
 
VsetVset_ctor (Vmem *vmem, const char *tname, int tsize, int tmaxNum, int ioKey)
 Construct the set object.
 
void Vset_dtor (Vset **thee)
 Destroy the set object.
 
char * Vset_createLast (Vset *thee)
 Create an object on the end of the list.
 
void Vset_destroyLast (Vset *thee)
 Free up the object currently on the end of the list.
 
void Vset_initData (Vset *thee)
 Initialize the Vset data (thee).
 
void Vset_reset (Vset *thee)
 Release all Ram controlled by this (thee) and re-initialize.
 
void Vset_check (Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd)
 Get and return the RAM Control Block (thee) information.
 
void Vset_memChk (Vset *thee)
 Print the exact current malloc usage.
 
int Vnm_sigInt (void)
 Signal and setjmp handling routine. Return the signal interrupt flag.
 
void Vnm_sigIntSet (void)
 Signal and setjmp handling routine. Set the signal interrupt flag.
 
void Vnm_sigIntClear (void)
 Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ +
 
int Vnm_jmpOk (void)
 Signal and setjmp handling routine. Return the "ok-to-jump" flag.
 
void Vnm_jmpOkSet (void)
 Signal and setjmp handling routine. Set the "okay-to-jump" flag.
 
void Vnm_jmpOkClear (void)
 Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ +
 
jmp_buf * Vnm_signalInit (void)
 Initialize the signal handling data structures.
 
void Vnm_regHand (void)
 Register the signal handler with the operating system.
 
void Vnm_sigHand (int num)
 Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".
 
double Vnm_powsafe (double x, double y)
 A safe VPOW function (avoids division by zero).
│ │ │ │ +
 
void Vnm_typeChk (void)
 Check out the sizes of various datatypes.
│ │ │ │ +
 
double Vnm_epsmac (void)
 Computes the unit roundoff of the machine in single
│ │ │ │ + precision. This is defined as the smallest positive machine number u such that 1.0d0 + u .ne. 1.0d0 (in single precision).
│ │ │ │ +
│ │ │ │ + A safe hardcoded machine epsilon as alternative:
│ │ │ │ + double value;
│ │ │ │ + value = 1.0e-9;
│ │ │ │ + return value;.
 
int Vnm_gentokens (char *buf, char **argv, const int argvmax, const char *white, const char *comment)
 Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens are separated by whitespace "white" with possible comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE!
 
void Vnm_tstart (int timer, const char *name)
 Starts the timer on the particular machine.
│ │ │ │ +
 
void Vnm_tstop (int timer, const char *name)
 Stops the timer on the particular machine.
 
char * Vnm_getuser (char *user, int usermax)
 Ask the system for the username.
 
char * Vnm_getos (char *os, int osmax)
 Ask the system for the operating system name.
 
char * Vnm_gethost (char *host, int hostmax)
 Ask the system for the hostname.
 
char * Vnm_gethome (char *path, int pathmax)
 Ask the system for the home directory.
 
char * Vnm_getcwd (char *path, int pathmax)
 Ask the system for the current working directory.
 
int Vnm_chdir (const char *path)
 Interact with the system to change the working directory.
 
int Vnm_mkdir (const char *path)
 Interact with the system to make a new directory.
│ │ │ │ +
 
int Vnm_system (const char *cmd)
 An improved ANSI-C "system" call.
 
int Vnm_systemBack (const char *cmd)
 A background variant of the ANSI-C "system" call.
│ │ │ │ +
 
int Vnm_systemKill (const char *cmd)
 Something like a UNIX "killall" call.
 
int Vnm_exec (int argc, char **argv)
 An improved UNIX "exec" call. This routine does not return except on error.
 
void Vnm_sleep (int nusecs)
 Implement a sleep function with microsecond resolution.
 
int Vnm_ioTag (void)
 Return my I/O tag.
 
int Vnm_nTags (void)
 Return the total number of tags.
 
void Vnm_setIoTag (int myTag, int numTags)
 Set my id.
 
FILE * Vnm_open (const int unit)
 Open an I/O console.
 
int Vnm_close (const int unit)
 Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_flush (const int unit)
 Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_redirect (const int flag)
 Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_print (const int unit, const char *format,...)
 External interface to the console i/o routine.
│ │ │ │ + We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_tprint (const int unit, const char *format,...)
 Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
 
void Vnm_qsort (int *u, int size)
 Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
 
void Vnm_qsortOrd (int *u, int *ord, int size)
 Front-end to quick sort integer array from [-large] to [+large].
 
void Vnm_dqsort (double *u, int size)
 Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
 
void Vnm_dqsortOrd (double *u, int *ord, int size)
 Front-end to quick sort integer array from [-large] to [+large].
 
│ │ │ │

Detailed Description

│ │ │ │ -

Class Vset: a dynamic set object.

│ │ │ │ +

Header file for an ISO C [V]irtual [N]umerical [M]achine.

│ │ │ │
Author
Michael Holst
│ │ │ │
Note
None
│ │ │ │
Version
│ │ │ │ -
Id
vset.h,v 1.20 2010/08/12 05:40:37 fetk Exp
│ │ │ │ +
Id
vnm.h,v 1.22 2010/08/12 05:40:36 fetk Exp
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │  * License as published by the Free Software Foundation; either
│ │ │ │ @@ -161,14 +235,1449 @@
│ │ │ │  * Lesser General Public License for more details.
│ │ │ │  *
│ │ │ │  * You should have received a copy of the GNU Lesser General Public
│ │ │ │  * License along with this library; if not, write to the Free Software
│ │ │ │  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
│ │ │ │  * 
│ │ │ │  *  
│ │ │ │ -
│ │ │ │ +

Macro Definition Documentation

│ │ │ │ + │ │ │ │ +

◆ VPOW_SAFE

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define VPOW_SAFE( x,
 
)   (Vnm_powsafe(x,y))
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

A safe VPOW function (avoids division by zero)

│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ VTIMERS

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
#define VTIMERS   100
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

the maiximal timer constant

│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ +

Function Documentation

│ │ │ │ + │ │ │ │ +

◆ Vnm_chdir()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_chdir (const char * path)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Interact with the system to change the working directory.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
pathPointer to the path
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_close()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_close (const int unit)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
unitindex for the file unit
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_dqsort()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_dqsort (double * u,
int size 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
uPointer to quick sort integer array
sizesize of the integer array
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_dqsortOrd()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_dqsortOrd (double * u,
int * ord,
int size 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Front-end to quick sort integer array from [-large] to [+large].

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
uPointer to quick sort integer array
ordPointer to reordered array
sizesize of the integer array
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_epsmac()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
double Vnm_epsmac (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Computes the unit roundoff of the machine in single
│ │ │ │ + precision. This is defined as the smallest positive machine number u such that 1.0d0 + u .ne. 1.0d0 (in single precision).
│ │ │ │ +
│ │ │ │ + A safe hardcoded machine epsilon as alternative:
│ │ │ │ + double value;
│ │ │ │ + value = 1.0e-9;
│ │ │ │ + return value;.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
the unit roundoff of the machine in single precision.
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_exec()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_exec (int argc,
char ** argv 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

An improved UNIX "exec" call. This routine does not return except on error.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
no return except on error
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
argcnumber of the command line arguments
argvthe command line arguments
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_flush()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_flush (const int unit)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
unitindex for the file unit
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_gentokens()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_gentokens (char * buf,
char ** argv,
const int argvmax,
const char * white,
const char * comment 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens are separated by whitespace "white" with possible comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE!

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
│ │ │ │ + Again, the input string "buf" IS MODIFIED; white space characters (defined in the input string "white") are replaced by the NULL character '\0'. The output "argv" is simply a list of pointers
│ │ │ │ + to the start of the tokens in "buf", which are NULL-terminated
│ │ │ │ + after we replace the white space with NULLs.
│ │ │ │ +
│ │ │ │ + We follow convention and "NULL"-terminate "argv" by setting the pointer following the last token to "VNULL". The return value is "argc", the number of tokens found (not including the terminating NULL pointer). For safety you must pass in the maximal length of argv in the parameter "argvmax".
│ │ │ │ +
│ │ │ │ + If we encounter a token which begins with a comment character (defined in the input string "comment"), then we ignore the rest of the tokens in the input buffer "buf". This is suitable
│ │ │ │ + for parsing shell languages such as sh/ksh/bash which have comments that start with e.g. "#" and continue until a newline.
│ │ │ │ +
│ │ │ │ + We DO NOT use the C library function strtok in this routine. (There are some bad implementations of strtok around apparently; the internal state variables maintained by strtok can get very
│ │ │ │ + messed up if you use strtok in multiple places in a code.)
│ │ │ │ +
Returns
number of tokens
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
bufbuffer containing message
argvthe command line arguments
argvmaxmaximal number of the command line arguments
whitePointer to the input string
commenttoken which begins with a comment character
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_getcwd()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
char * Vnm_getcwd (char * path,
int pathmax 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Ask the system for the current working directory.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
│ │ │ │ + Consider it an error if we can't return something useful; therefore we will VASSERT(path!=VNULL) before returning.
│ │ │ │ +
│ │ │ │ + Note that unlike Vnm_gethome, a call to Vnm_getcwd returns the current directory, possibly modified from call to call.
│ │ │ │ +
│ │ │ │ + I.e., calls to Vnm_chdir can change the current working
│ │ │ │ + directory; Vnm_getcwd returns the current directory, whatever that might be.
│ │ │ │ +
Returns
the current working directory
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
pathPointer to the path
pathmaxindex for the size of path
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_gethome()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
char * Vnm_gethome (char * path,
int pathmax 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Ask the system for the home directory.

│ │ │ │ +

=

Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
│ │ │ │ + The following preference order is used to set the home directory:
│ │ │ │ +
│ │ │ │ + MCSH_HOME (the user must define this in his environment)
│ │ │ │ + CWD (always defined as the current working directory)
│ │ │ │ +
│ │ │ │ + We consider it an error if we can't return something useful;
│ │ │ │ + therefore we will VASSERT(path!=VNULL) before returning.
│ │ │ │ +
│ │ │ │ + We settle on a home directory the first time we are called, and then we simply return this fixed home directory forever.
│ │ │ │ + In other words, the first call to Vnm_gethome, regardless of
│ │ │ │ + who makes the call, establishes the home directory for everyone else (as long as everyone goes through Vnm_gethome!).
│ │ │ │ +
Returns
the home directory
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
pathPointer to the path
pathmaxindex for the size of path
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_gethost()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
char * Vnm_gethost (char * host,
int hostmax 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Ask the system for the hostname.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
the hostname
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
hostPointer to the hostname.
hostmaxindex for maximal size of host name
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_getos()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
char * Vnm_getos (char * os,
int osmax 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Ask the system for the operating system name.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
the operating system name
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
osPointer to the OS type
osmaxindex for maximal size of OS name
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_getuser()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
char * Vnm_getuser (char * user,
int usermax 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Ask the system for the username.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
the username of the system
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
userPointer to the username of the system
usermaxindex for maximal size of user name
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_ioTag()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_ioTag (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Return my I/O tag.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
my I/O tag.
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_jmpOk()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_jmpOk (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Return the "ok-to-jump" flag.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
"ok-to-jump" flag.
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_jmpOkClear()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_jmpOkClear (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_jmpOkSet()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_jmpOkSet (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Set the "okay-to-jump" flag.

│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_mkdir()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_mkdir (const char * path)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Interact with the system to make a new directory.
│ │ │ │ +

│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
pathPointer to the path
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_nTags()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_nTags (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Return the total number of tags.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
total number of tags.
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_open()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
FILE * Vnm_open (const int unit)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Open an I/O console.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
We MUST NOT use VASSERT (or Vnm_print!) in this routine.   
│ │ │ │ +
│ │ │ │ +The following codes are used:                                               
│ │ │ │ +
│ │ │ │ +unit#      C output unit      
│ │ │ │ +-------    -------------                                                
│ │ │ │ +
│ │ │ │ +unit==0    garbage   -- Non-interactive i/o; lots of stuff                        
│ │ │ │ +                        (can be redirected to ${MCSH_HOME/io.mc)
│ │ │ │ +
│ │ │ │ +unit==1    stdout    -- standard output (Interactive I/O)            
│ │ │ │ +
│ │ │ │ +unit==2    stderr    -- standard error (IMPORTANT interactive I/O)          
│ │ │ │ +
│ │ │ │ +unit==3    history   -- History file ${MCSH_HOME}/hist.mcsh                       
│ │ │ │ +
│ │ │ │ +unit==else /dev/null -- Error...                                
│ │ │ │ +
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
unitindex for the file unit
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_powsafe()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
double Vnm_powsafe (double x,
double y 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

A safe VPOW function (avoids division by zero).
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
output value of a VPOW function
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
xinput parameter
yinput parameter
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_print()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_print (const int unit,
const char * format,
 ... 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

External interface to the console i/o routine.
│ │ │ │ + We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
unitindex for the file unit
formatPointer to the print format
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_qsort()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_qsort (int * u,
int size 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
uPointer to quick sort integer array
sizesize of the integer array
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_qsortOrd()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_qsortOrd (int * u,
int * ord,
int size 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Front-end to quick sort integer array from [-large] to [+large].

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None *
│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
uPointer to quick sort integer array
ordPointer to reordered array
sizesize of the integer array
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_redirect()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_redirect (const int flag)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
flagindex for the redirect flag
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_regHand()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_regHand (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Register the signal handler with the operating system.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_setIoTag()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_setIoTag (int myTag,
int numTags 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Set my id.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
myTagindex for the tag
numTagsnumber of tags
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_sigHand()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_sigHand (int num)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_sigInt()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_sigInt (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Return the signal interrupt flag.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
Signal interrupt flag.
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_sigIntClear()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_sigIntClear (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_sigIntSet()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_sigIntSet (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Signal and setjmp handling routine. Set the signal interrupt flag.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_signalInit()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
jmp_buf * Vnm_signalInit (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Initialize the signal handling data structures.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
the signal handling data structures
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_sleep()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_sleep (int nusecs)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Implement a sleep function with microsecond resolution.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ + This is hacked out of the "sleep_us" example in Rick Steven's Advance Unix Programming book.
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
nusecsnumber of microseconds
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_system()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_system (const char * cmd)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

An improved ANSI-C "system" call.

│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
cmdPointer to the command
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_systemBack()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_systemBack (const char * cmd)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

A background variant of the ANSI-C "system" call.
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
cmdPointer to the command
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_systemKill()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
int Vnm_systemKill (const char * cmd)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Something like a UNIX "killall" call.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
Success enumeration
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ +
cmdPointer to the command
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_tprint()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_tprint (const int unit,
const char * format,
 ... 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o) For a tag to be added, both of the following conditions must hold:
│ │ │ │ + Vnm_ioTag() >= 0 (I.e., I must have been given a tag)
│ │ │ │ + Vnm_nTags() > 1 (I must not be the only one given a tag)
│ │ │ │ +
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
unitindex for the file unit
formatPointer to the print format
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_tstart()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_tstart (int timer,
const char * name 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Starts the timer on the particular machine.
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
timerindex for the starting timer
namePointer to the object
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_tstop()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_tstop (int timer,
const char * name 
)
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Stops the timer on the particular machine.

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ +
Parameters
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
timerindex for the starting timer
namePointer to the object
│ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

◆ Vnm_typeChk()

│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
void Vnm_typeChk (void )
│ │ │ │ +
│ │ │ │ + │ │ │ │ +

Check out the sizes of various datatypes.
│ │ │ │ +

│ │ │ │ +
Author
Michael Holst
│ │ │ │ +
Note
Useful constants and functions (timers, epsilon, token generators, i/o)
│ │ │ │ +
Returns
None
│ │ │ │ + │ │ │ │ +
│ │ │ │ +
│ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,100 +3,188 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * vsys │ │ │ │ │ * maloc │ │ │ │ │ -Classes | Typedefs | Functions │ │ │ │ │ -vset.h File Reference │ │ │ │ │ -Vset_class │ │ │ │ │ -Class Vset: a dynamic set object. More... │ │ │ │ │ +Macros | Functions │ │ │ │ │ +vnm.h File Reference │ │ │ │ │ +Header file for an ISO C [V]irtual [N]umerical [M]achine. More... │ │ │ │ │ #include │ │ │ │ │ -#include │ │ │ │ │ -#include │ │ │ │ │ -Include dependency graph for vset.h: │ │ │ │ │ +Include dependency graph for vnm.h: │ │ │ │ │ This graph shows which files directly or indirectly include this file: │ │ │ │ │ Go_to_the_source_code_of_this_file. │ │ │ │ │ - Classes │ │ │ │ │ -struct  sVset │ │ │ │ │ -  Contains public data members for Vset class. More... │ │ │ │ │ -  │ │ │ │ │ - Typedefs │ │ │ │ │ -typedef struct sVset Vset │ │ │ │ │ -  Declaration of the Vset class as the Vset structure. │ │ │ │ │ + Macros │ │ │ │ │ +#define VPOW_SAFE(x, y)   (Vnm_powsafe(x,y)) │ │ │ │ │ +  A safe VPOW function (avoids division by zero) │ │ │ │ │ +  │ │ │ │ │ +#define VTIMERS   100 │ │ │ │ │ +  the maiximal timer constant │ │ │ │ │   │ │ │ │ │ Functions │ │ │ │ │ - int Vset_num (Vset *thee) │ │ │ │ │ -  Return the number of things currently in the list. │ │ │ │ │ + int Vnm_sigInt (void) │ │ │ │ │ +  Signal and setjmp handling routine. Return the signal interrupt │ │ │ │ │ + flag. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_sigIntSet (void) │ │ │ │ │ +  Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │   │ │ │ │ │ -char * Vset_access (Vset *thee, int i) │ │ │ │ │ -  Access an object in an arbitrary place in the list. │ │ │ │ │ + void Vnm_sigIntClear (void) │ │ │ │ │ + Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │   │ │ │ │ │ -char * Vset_create (Vset *thee) │ │ │ │ │ -  Create an object on the end of the list. │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ -char * Vset_first (Vset *thee) │ │ │ │ │ -  Return the first object in the set. │ │ │ │ │ + int Vnm_jmpOk (void) │ │ │ │ │ +  Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_jmpOkSet (void) │ │ │ │ │ +  Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_jmpOkClear (void) │ │ │ │ │ +  Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ │ │ │ │ │   │ │ │ │ │ -char * Vset_last (Vset *thee) │ │ │ │ │ -  Return the last object in the set. │ │ │ │ │ +jmp_buf * Vnm_signalInit (void) │ │ │ │ │ +  Initialize the signal handling data structures. │ │ │ │ │   │ │ │ │ │ -char * Vset_next (Vset *thee) │ │ │ │ │ -  Return the next object in the set. │ │ │ │ │ + void Vnm_regHand (void) │ │ │ │ │ +  Register the signal handler with the operating system. │ │ │ │ │   │ │ │ │ │ -char * Vset_prev (Vset *thee) │ │ │ │ │ -  Return the prev object in the set. │ │ │ │ │ + void Vnm_sigHand (int num) │ │ │ │ │ +  Handle events such as SIGINT. We must have first been registered │ │ │ │ │ + with "Vnm_signalInit". │ │ │ │ │   │ │ │ │ │ -char * Vset_peekFirst (Vset *thee) │ │ │ │ │ -  Return the first object in the set. │ │ │ │ │ + double Vnm_powsafe (double x, double y) │ │ │ │ │ +  A safe VPOW function (avoids division by zero). │ │ │ │ │ + │ │ │ │ │   │ │ │ │ │ -char * Vset_peekLast (Vset *thee) │ │ │ │ │ -  Return the last object in the set. │ │ │ │ │ + void Vnm_typeChk (void) │ │ │ │ │ +  Check out the sizes of various datatypes. │ │ │ │ │ + │ │ │ │ │   │ │ │ │ │ - void Vset_destroy (Vset *thee) │ │ │ │ │ -  Delete an object from the end of the list. │ │ │ │ │ + double Vnm_epsmac (void) │ │ │ │ │ + Computes the unit roundoff of the machine in single │ │ │ │ │ + precision. This is defined as the smallest positive machine number u │ │ │ │ │ + such that 1.0d0 + u .ne. 1.0d0 (in single precision). │ │ │ │ │ +  │ │ │ │ │ + A safe hardcoded machine epsilon as alternative: │ │ │ │ │ + double value; │ │ │ │ │ + value = 1.0e-9; │ │ │ │ │ + return value;. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_gentokens (char *buf, char **argv, const int argvmax, const char │ │ │ │ │ + *white, const char *comment) │ │ │ │ │ + Generate an [argv,argc] pair from a character string "buf" (assumed │ │ │ │ │ +  NULL-terminated) in which tokens are separated by whitespace "white" │ │ │ │ │ + with possible comments "comment" occuring. THE INPUT STRING IS │ │ │ │ │ + MODIFIED HERE! │ │ │ │ │   │ │ │ │ │ -Vset * Vset_ctor (Vmem *vmem, const char *tname, int tsize, int tmaxNum, int │ │ │ │ │ - ioKey) │ │ │ │ │ -  Construct the set object. │ │ │ │ │ + void Vnm_tstart (int timer, const char *name) │ │ │ │ │ +  Starts the timer on the particular machine. │ │ │ │ │ + │ │ │ │ │   │ │ │ │ │ - void Vset_dtor (Vset **thee) │ │ │ │ │ -  Destroy the set object. │ │ │ │ │ + void Vnm_tstop (int timer, const char *name) │ │ │ │ │ +  Stops the timer on the particular machine. │ │ │ │ │   │ │ │ │ │ -char * Vset_createLast (Vset *thee) │ │ │ │ │ -  Create an object on the end of the list. │ │ │ │ │ + char * Vnm_getuser (char *user, int usermax) │ │ │ │ │ +  Ask the system for the username. │ │ │ │ │   │ │ │ │ │ - void Vset_destroyLast (Vset *thee) │ │ │ │ │ -  Free up the object currently on the end of the list. │ │ │ │ │ + char * Vnm_getos (char *os, int osmax) │ │ │ │ │ +  Ask the system for the operating system name. │ │ │ │ │   │ │ │ │ │ - void Vset_initData (Vset *thee) │ │ │ │ │ -  Initialize the Vset data (thee). │ │ │ │ │ + char * Vnm_gethost (char *host, int hostmax) │ │ │ │ │ +  Ask the system for the hostname. │ │ │ │ │   │ │ │ │ │ - void Vset_reset (Vset *thee) │ │ │ │ │ -  Release all Ram controlled by this (thee) and re-initialize. │ │ │ │ │ + char * Vnm_gethome (char *path, int pathmax) │ │ │ │ │ +  Ask the system for the home directory. │ │ │ │ │   │ │ │ │ │ - void Vset_check (Vset *thee, int *tnum, int *tsize, int *tVecUse, int │ │ │ │ │ - *tVecMal, int *tVecOhd) │ │ │ │ │ -  Get and return the RAM Control Block (thee) information. │ │ │ │ │ + char * Vnm_getcwd (char *path, int pathmax) │ │ │ │ │ +  Ask the system for the current working directory. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_chdir (const char *path) │ │ │ │ │ +  Interact with the system to change the working directory. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_mkdir (const char *path) │ │ │ │ │ +  Interact with the system to make a new directory. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ + int Vnm_system (const char *cmd) │ │ │ │ │ +  An improved ANSI-C "system" call. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_systemBack (const char *cmd) │ │ │ │ │ +  A background variant of the ANSI-C "system" call. │ │ │ │ │ + │ │ │ │ │   │ │ │ │ │ - void Vset_memChk (Vset *thee) │ │ │ │ │ -  Print the exact current malloc usage. │ │ │ │ │ + int Vnm_systemKill (const char *cmd) │ │ │ │ │ +  Something like a UNIX "killall" call. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_exec (int argc, char **argv) │ │ │ │ │ +  An improved UNIX "exec" call. This routine does not return except on │ │ │ │ │ + error. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_sleep (int nusecs) │ │ │ │ │ +  Implement a sleep function with microsecond resolution. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_ioTag (void) │ │ │ │ │ +  Return my I/O tag. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_nTags (void) │ │ │ │ │ +  Return the total number of tags. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_setIoTag (int myTag, int numTags) │ │ │ │ │ +  Set my id. │ │ │ │ │ +  │ │ │ │ │ + FILE * Vnm_open (const int unit) │ │ │ │ │ +  Open an I/O console. │ │ │ │ │ +  │ │ │ │ │ + int Vnm_close (const int unit) │ │ │ │ │ +  Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ + this routine. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_flush (const int unit) │ │ │ │ │ +  Attempt to flush the specified i/o stream. We MUST NOT use VASSERT │ │ │ │ │ + (or Vnm_print!) in this routine. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_redirect (const int flag) │ │ │ │ │ + Set/unset the redirect flag for UNIT zero. When redirected, I/O goes │ │ │ │ │ +  to the file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or │ │ │ │ │ + Vnm_print!) in this routine. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_print (const int unit, const char *format,...) │ │ │ │ │ +  External interface to the console i/o routine. │ │ │ │ │ + We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_tprint (const int unit, const char *format,...) │ │ │ │ │ +  Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or │ │ │ │ │ + Vnm_print!) in this routine. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_qsort (int *u, int size) │ │ │ │ │ +  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ + void Vnm_qsortOrd (int *u, int *ord, int size) │ │ │ │ │ +  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ +  │ │ │ │ │ + void Vnm_dqsort (double *u, int size) │ │ │ │ │ +  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + │ │ │ │ │ +  │ │ │ │ │ + void Vnm_dqsortOrd (double *u, int *ord, int size) │ │ │ │ │ +  Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │   │ │ │ │ │ ***** Detailed Description ***** │ │ │ │ │ -Class Vset: a dynamic set object. │ │ │ │ │ +Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ │ Author │ │ │ │ │ Michael Holst │ │ │ │ │ Note │ │ │ │ │ None │ │ │ │ │ Version │ │ │ │ │ Id │ │ │ │ │ - vset.h,v 1.20 2010/08/12 05:40:37 fetk Exp │ │ │ │ │ + vnm.h,v 1.22 2010/08/12 05:40:36 fetk Exp │ │ │ │ │ Attention │ │ │ │ │ * │ │ │ │ │ * MALOC = < Minimal Abstraction Layer for Object-oriented C > │ │ │ │ │ * Copyright (C) 1994-- Michael Holst │ │ │ │ │ * │ │ │ │ │ * This library is free software; you can redistribute it and/or │ │ │ │ │ * modify it under the terms of the GNU Lesser General Public │ │ │ │ │ @@ -109,10 +197,592 @@ │ │ │ │ │ * Lesser General Public License for more details. │ │ │ │ │ * │ │ │ │ │ * You should have received a copy of the GNU Lesser General Public │ │ │ │ │ * License along with this library; if not, write to the Free Software │ │ │ │ │ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA │ │ │ │ │ * │ │ │ │ │ * │ │ │ │ │ +***** Macro Definition Documentation ***** │ │ │ │ │ +***** ◆ VPOW_SAFE ***** │ │ │ │ │ +#define VPOW_SAFE (  x, │ │ │ │ │ +  y  │ │ │ │ │ + )    (Vnm_powsafe(x,y)) │ │ │ │ │ +A safe VPOW function (avoids division by zero) │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ +***** ◆ VTIMERS ***** │ │ │ │ │ +#define VTIMERS   100 │ │ │ │ │ +the maiximal timer constant │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ +***** Function Documentation ***** │ │ │ │ │ +***** ◆ Vnm_chdir() ***** │ │ │ │ │ +int Vnm_chdir ( const char * path ) │ │ │ │ │ +Interact with the system to change the working directory. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + path Pointer to the path │ │ │ │ │ +***** ◆ Vnm_close() ***** │ │ │ │ │ +int Vnm_close ( const int unit ) │ │ │ │ │ +Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + unit index for the file unit │ │ │ │ │ +***** ◆ Vnm_dqsort() ***** │ │ │ │ │ +void Vnm_dqsort ( double * u, │ │ │ │ │ + int  size  │ │ │ │ │ + ) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + u Pointer to quick sort integer array │ │ │ │ │ + size size of the integer array │ │ │ │ │ +***** ◆ Vnm_dqsortOrd() ***** │ │ │ │ │ +void Vnm_dqsortOrd ( double * u, │ │ │ │ │ + int *  ord, │ │ │ │ │ + int  size  │ │ │ │ │ + ) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + u Pointer to quick sort integer array │ │ │ │ │ + ord Pointer to reordered array │ │ │ │ │ + size size of the integer array │ │ │ │ │ +***** ◆ Vnm_epsmac() ***** │ │ │ │ │ +double Vnm_epsmac ( void  ) │ │ │ │ │ +Computes the unit roundoff of the machine in single │ │ │ │ │ +precision. This is defined as the smallest positive machine number u such that │ │ │ │ │ +1.0d0 + u .ne. 1.0d0 (in single precision). │ │ │ │ │ + │ │ │ │ │ +A safe hardcoded machine epsilon as alternative: │ │ │ │ │ +double value; │ │ │ │ │ +value = 1.0e-9; │ │ │ │ │ +return value;. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + the unit roundoff of the machine in single precision. │ │ │ │ │ +***** ◆ Vnm_exec() ***** │ │ │ │ │ +int Vnm_exec ( int  argc, │ │ │ │ │ + char ** argv  │ │ │ │ │ + ) │ │ │ │ │ +An improved UNIX "exec" call. This routine does not return except on error. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + no return except on error │ │ │ │ │ + Parameters │ │ │ │ │ + argc number of the command line arguments │ │ │ │ │ + argv the command line arguments │ │ │ │ │ +***** ◆ Vnm_flush() ***** │ │ │ │ │ +void Vnm_flush ( const int unit ) │ │ │ │ │ +Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or │ │ │ │ │ +Vnm_print!) in this routine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + unit index for the file unit │ │ │ │ │ +***** ◆ Vnm_gentokens() ***** │ │ │ │ │ +int Vnm_gentokens ( char *  buf, │ │ │ │ │ + char **  argv, │ │ │ │ │ + const int  argvmax, │ │ │ │ │ + const char * white, │ │ │ │ │ + const char * comment  │ │ │ │ │ + ) │ │ │ │ │ +Generate an [argv,argc] pair from a character string "buf" (assumed NULL- │ │ │ │ │ +terminated) in which tokens are separated by whitespace "white" with possible │ │ │ │ │ +comments "comment" occuring. THE INPUT STRING IS MODIFIED HERE! │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + │ │ │ │ │ + Again, the input string "buf" IS MODIFIED; white space characters │ │ │ │ │ + (defined in the input string "white") are replaced by the NULL character │ │ │ │ │ + '\0'. The output "argv" is simply a list of pointers │ │ │ │ │ + to the start of the tokens in "buf", which are NULL-terminated │ │ │ │ │ + after we replace the white space with NULLs. │ │ │ │ │ + │ │ │ │ │ + We follow convention and "NULL"-terminate "argv" by setting the pointer │ │ │ │ │ + following the last token to "VNULL". The return value is "argc", the │ │ │ │ │ + number of tokens found (not including the terminating NULL pointer). For │ │ │ │ │ + safety you must pass in the maximal length of argv in the parameter │ │ │ │ │ + "argvmax". │ │ │ │ │ + │ │ │ │ │ + If we encounter a token which begins with a comment character (defined in │ │ │ │ │ + the input string "comment"), then we ignore the rest of the tokens in the │ │ │ │ │ + input buffer "buf". This is suitable │ │ │ │ │ + for parsing shell languages such as sh/ksh/bash which have comments that │ │ │ │ │ + start with e.g. "#" and continue until a newline. │ │ │ │ │ + │ │ │ │ │ + We DO NOT use the C library function strtok in this routine. (There are │ │ │ │ │ + some bad implementations of strtok around apparently; the internal state │ │ │ │ │ + variables maintained by strtok can get very │ │ │ │ │ + messed up if you use strtok in multiple places in a code.) │ │ │ │ │ + Returns │ │ │ │ │ + number of tokens │ │ │ │ │ + Parameters │ │ │ │ │ + buf buffer containing message │ │ │ │ │ + argv the command line arguments │ │ │ │ │ + argvmax maximal number of the command line arguments │ │ │ │ │ + white Pointer to the input string │ │ │ │ │ + comment token which begins with a comment character │ │ │ │ │ +***** ◆ Vnm_getcwd() ***** │ │ │ │ │ +char * Vnm_getcwd ( char * path, │ │ │ │ │ + int  pathmax  │ │ │ │ │ + ) │ │ │ │ │ +Ask the system for the current working directory. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + │ │ │ │ │ + Consider it an error if we can't return something useful; therefore we │ │ │ │ │ + will VASSERT(path!=VNULL) before returning. │ │ │ │ │ + │ │ │ │ │ + Note that unlike Vnm_gethome, a call to Vnm_getcwd returns the current │ │ │ │ │ + directory, possibly modified from call to call. │ │ │ │ │ + │ │ │ │ │ + I.e., calls to Vnm_chdir can change the current working │ │ │ │ │ + directory; Vnm_getcwd returns the current directory, whatever that might │ │ │ │ │ + be. │ │ │ │ │ + Returns │ │ │ │ │ + the current working directory │ │ │ │ │ + Parameters │ │ │ │ │ + path Pointer to the path │ │ │ │ │ + pathmax index for the size of path │ │ │ │ │ +***** ◆ Vnm_gethome() ***** │ │ │ │ │ +char * Vnm_gethome ( char * path, │ │ │ │ │ + int  pathmax  │ │ │ │ │ + ) │ │ │ │ │ +Ask the system for the home directory. │ │ │ │ │ += │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + │ │ │ │ │ + The following preference order is used to set the home directory: │ │ │ │ │ + │ │ │ │ │ + MCSH_HOME (the user must define this in his environment) │ │ │ │ │ + CWD (always defined as the current working directory) │ │ │ │ │ + │ │ │ │ │ + We consider it an error if we can't return something useful; │ │ │ │ │ + therefore we will VASSERT(path!=VNULL) before returning. │ │ │ │ │ + │ │ │ │ │ + We settle on a home directory the first time we are called, and then we │ │ │ │ │ + simply return this fixed home directory forever. │ │ │ │ │ + In other words, the first call to Vnm_gethome, regardless of │ │ │ │ │ + who makes the call, establishes the home directory for everyone else (as │ │ │ │ │ + long as everyone goes through Vnm_gethome!). │ │ │ │ │ + Returns │ │ │ │ │ + the home directory │ │ │ │ │ + Parameters │ │ │ │ │ + path Pointer to the path │ │ │ │ │ + pathmax index for the size of path │ │ │ │ │ +***** ◆ Vnm_gethost() ***** │ │ │ │ │ +char * Vnm_gethost ( char * host, │ │ │ │ │ + int  hostmax  │ │ │ │ │ + ) │ │ │ │ │ +Ask the system for the hostname. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + the hostname │ │ │ │ │ + Parameters │ │ │ │ │ + host Pointer to the hostname. │ │ │ │ │ + hostmax index for maximal size of host name │ │ │ │ │ +***** ◆ Vnm_getos() ***** │ │ │ │ │ +char * Vnm_getos ( char * os, │ │ │ │ │ + int  osmax  │ │ │ │ │ + ) │ │ │ │ │ +Ask the system for the operating system name. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + the operating system name │ │ │ │ │ + Parameters │ │ │ │ │ + os Pointer to the OS type │ │ │ │ │ + osmax index for maximal size of OS name │ │ │ │ │ +***** ◆ Vnm_getuser() ***** │ │ │ │ │ +char * Vnm_getuser ( char * user, │ │ │ │ │ + int  usermax  │ │ │ │ │ + ) │ │ │ │ │ +Ask the system for the username. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + the username of the system │ │ │ │ │ + Parameters │ │ │ │ │ + user Pointer to the username of the system │ │ │ │ │ + usermax index for maximal size of user name │ │ │ │ │ +***** ◆ Vnm_ioTag() ***** │ │ │ │ │ +int Vnm_ioTag ( void  ) │ │ │ │ │ +Return my I/O tag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + my I/O tag. │ │ │ │ │ +***** ◆ Vnm_jmpOk() ***** │ │ │ │ │ +int Vnm_jmpOk ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + "ok-to-jump" flag. │ │ │ │ │ +***** ◆ Vnm_jmpOkClear() ***** │ │ │ │ │ +void Vnm_jmpOkClear ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_jmpOkSet() ***** │ │ │ │ │ +void Vnm_jmpOkSet ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_mkdir() ***** │ │ │ │ │ +int Vnm_mkdir ( const char * path ) │ │ │ │ │ +Interact with the system to make a new directory. │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + path Pointer to the path │ │ │ │ │ +***** ◆ Vnm_nTags() ***** │ │ │ │ │ +int Vnm_nTags ( void  ) │ │ │ │ │ +Return the total number of tags. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + total number of tags. │ │ │ │ │ +***** ◆ Vnm_open() ***** │ │ │ │ │ +FILE * Vnm_open ( const int unit ) │ │ │ │ │ +Open an I/O console. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ + │ │ │ │ │ + The following codes are used: │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + unit# C output unit │ │ │ │ │ + ------- ------------- │ │ │ │ │ + │ │ │ │ │ + unit==0 garbage -- Non-interactive i/o; lots of stuff │ │ │ │ │ + │ │ │ │ │ + (can be redirected to ${MCSH_HOME/io.mc) │ │ │ │ │ + │ │ │ │ │ + unit==1 stdout -- standard output (Interactive I/O) │ │ │ │ │ + │ │ │ │ │ + unit==2 stderr -- standard error (IMPORTANT interactive I/O) │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + unit==3 history -- History file ${MCSH_HOME}/hist.mcsh │ │ │ │ │ + │ │ │ │ │ + │ │ │ │ │ + unit==else /dev/null -- Error... │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + unit index for the file unit │ │ │ │ │ +***** ◆ Vnm_powsafe() ***** │ │ │ │ │ +double Vnm_powsafe ( double x, │ │ │ │ │ + double y  │ │ │ │ │ + ) │ │ │ │ │ +A safe VPOW function (avoids division by zero). │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + output value of a VPOW function │ │ │ │ │ + Parameters │ │ │ │ │ + x input parameter │ │ │ │ │ + y input parameter │ │ │ │ │ +***** ◆ Vnm_print() ***** │ │ │ │ │ +void Vnm_print ( const int  unit, │ │ │ │ │ + const char * format, │ │ │ │ │ +   ...  │ │ │ │ │ + ) │ │ │ │ │ +External interface to the console i/o routine. │ │ │ │ │ +We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + unit index for the file unit │ │ │ │ │ + format Pointer to the print format │ │ │ │ │ +***** ◆ Vnm_qsort() ***** │ │ │ │ │ +void Vnm_qsort ( int * u, │ │ │ │ │ + int  size  │ │ │ │ │ + ) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + u Pointer to quick sort integer array │ │ │ │ │ + size size of the integer array │ │ │ │ │ +***** ◆ Vnm_qsortOrd() ***** │ │ │ │ │ +void Vnm_qsortOrd ( int * u, │ │ │ │ │ + int * ord, │ │ │ │ │ + int  size  │ │ │ │ │ + ) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None * │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Parameters │ │ │ │ │ + u Pointer to quick sort integer array │ │ │ │ │ + ord Pointer to reordered array │ │ │ │ │ + size size of the integer array │ │ │ │ │ +***** ◆ Vnm_redirect() ***** │ │ │ │ │ +void Vnm_redirect ( const int flag ) │ │ │ │ │ +Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the │ │ │ │ │ +file: ${MCSH_HOME}/io.mc. We MUST NOT use VASSERT (or Vnm_print!) in this │ │ │ │ │ +routine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + flag index for the redirect flag │ │ │ │ │ +***** ◆ Vnm_regHand() ***** │ │ │ │ │ +void Vnm_regHand ( void  ) │ │ │ │ │ +Register the signal handler with the operating system. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_setIoTag() ***** │ │ │ │ │ +void Vnm_setIoTag ( int myTag, │ │ │ │ │ + int numTags  │ │ │ │ │ + ) │ │ │ │ │ +Set my id. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + myTag index for the tag │ │ │ │ │ + numTags number of tags │ │ │ │ │ +***** ◆ Vnm_sigHand() ***** │ │ │ │ │ +void Vnm_sigHand ( int num ) │ │ │ │ │ +Handle events such as SIGINT. We must have first been registered with │ │ │ │ │ +"Vnm_signalInit". │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_sigInt() ***** │ │ │ │ │ +int Vnm_sigInt ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Return the signal interrupt flag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + Signal interrupt flag. │ │ │ │ │ +***** ◆ Vnm_sigIntClear() ***** │ │ │ │ │ +void Vnm_sigIntClear ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_sigIntSet() ***** │ │ │ │ │ +void Vnm_sigIntSet ( void  ) │ │ │ │ │ +Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ +***** ◆ Vnm_signalInit() ***** │ │ │ │ │ +jmp_buf * Vnm_signalInit ( void  ) │ │ │ │ │ +Initialize the signal handling data structures. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + the signal handling data structures │ │ │ │ │ +***** ◆ Vnm_sleep() ***** │ │ │ │ │ +void Vnm_sleep ( int nusecs ) │ │ │ │ │ +Implement a sleep function with microsecond resolution. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + This is hacked out of the "sleep_us" example in Rick Steven's Advance │ │ │ │ │ + Unix Programming book. │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + nusecs number of microseconds │ │ │ │ │ +***** ◆ Vnm_system() ***** │ │ │ │ │ +int Vnm_system ( const char * cmd ) │ │ │ │ │ +An improved ANSI-C "system" call. │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + cmd Pointer to the command │ │ │ │ │ +***** ◆ Vnm_systemBack() ***** │ │ │ │ │ +int Vnm_systemBack ( const char * cmd ) │ │ │ │ │ +A background variant of the ANSI-C "system" call. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + cmd Pointer to the command │ │ │ │ │ +***** ◆ Vnm_systemKill() ***** │ │ │ │ │ +int Vnm_systemKill ( const char * cmd ) │ │ │ │ │ +Something like a UNIX "killall" call. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + Success enumeration │ │ │ │ │ + Parameters │ │ │ │ │ + cmd Pointer to the command │ │ │ │ │ +***** ◆ Vnm_tprint() ***** │ │ │ │ │ +void Vnm_tprint ( const int  unit, │ │ │ │ │ + const char * format, │ │ │ │ │ +   ...  │ │ │ │ │ + ) │ │ │ │ │ +Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ +this routine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + For a tag to be added, both of the following conditions must hold: │ │ │ │ │ + Vnm_ioTag() >= 0 (I.e., I must have been given a tag) │ │ │ │ │ + Vnm_nTags() > 1 (I must not be the only one given a tag) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + unit index for the file unit │ │ │ │ │ + format Pointer to the print format │ │ │ │ │ +***** ◆ Vnm_tstart() ***** │ │ │ │ │ +void Vnm_tstart ( int  timer, │ │ │ │ │ + const char * name  │ │ │ │ │ + ) │ │ │ │ │ +Starts the timer on the particular machine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + timer index for the starting timer │ │ │ │ │ + name Pointer to the object │ │ │ │ │ +***** ◆ Vnm_tstop() ***** │ │ │ │ │ +void Vnm_tstop ( int  timer, │ │ │ │ │ + const char * name  │ │ │ │ │ + ) │ │ │ │ │ +Stops the timer on the particular machine. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ + Parameters │ │ │ │ │ + timer index for the starting timer │ │ │ │ │ + name Pointer to the object │ │ │ │ │ +***** ◆ Vnm_typeChk() ***** │ │ │ │ │ +void Vnm_typeChk ( void  ) │ │ │ │ │ +Check out the sizes of various datatypes. │ │ │ │ │ + Author │ │ │ │ │ + Michael Holst │ │ │ │ │ + Note │ │ │ │ │ + Useful constants and functions (timers, epsilon, token generators, i/o) │ │ │ │ │ + Returns │ │ │ │ │ + None │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00023_source.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vset.h Source File │ │ │ │ +MALOC: vnm.h Source File │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -44,198 +44,152 @@ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ -
vset.h
│ │ │ │ +
vnm.h
│ │ │ │
│ │ │ │
│ │ │ │ Go to the documentation of this file.
1
│ │ │ │ -
38#ifndef _VSET_H_
│ │ │ │ -
39#define _VSET_H_
│ │ │ │ -
40
│ │ │ │ -
41#include <maloc/maloc_base.h>
│ │ │ │ -
42
│ │ │ │ -
43#include <maloc/vnm.h>
│ │ │ │ -
44#include <maloc/vmem.h>
│ │ │ │ -
45
│ │ │ │ -
46/*
│ │ │ │ -
47 * ***************************************************************************
│ │ │ │ -
48 * Class Vset: Parameters and datatypes
│ │ │ │ -
49 * ***************************************************************************
│ │ │ │ -
50 */
│ │ │ │ -
51
│ │ │ │ -
│ │ │ │ -
57struct sVset {
│ │ │ │ -
58
│ │ │ │ - │ │ │ │ - │ │ │ │ -
63
│ │ │ │ -
65 int curT;
│ │ │ │ -
66
│ │ │ │ - │ │ │ │ -
70 int sizeT;
│ │ │ │ -
71
│ │ │ │ - │ │ │ │ -
75 int numT;
│ │ │ │ -
77 int prtT;
│ │ │ │ -
78
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
89
│ │ │ │ -
91 char **table;
│ │ │ │ +
33#ifndef _VNM_H_
│ │ │ │ +
34#define _VNM_H_
│ │ │ │ +
35
│ │ │ │ +
36#include <maloc/maloc_base.h>
│ │ │ │ +
37
│ │ │ │ +
38
│ │ │ │ +
46int Vnm_sigInt(void);
│ │ │ │ +
47
│ │ │ │ +
55void Vnm_sigIntSet(void);
│ │ │ │ +
56
│ │ │ │ +
64void Vnm_sigIntClear(void);
│ │ │ │ +
65
│ │ │ │ +
73int Vnm_jmpOk(void);
│ │ │ │ +
74
│ │ │ │ +
82void Vnm_jmpOkSet(void);
│ │ │ │ +
83
│ │ │ │ +
91void Vnm_jmpOkClear(void);
│ │ │ │
92
│ │ │ │ -
93};
│ │ │ │ -
│ │ │ │ -
94
│ │ │ │ -
100typedef struct sVset Vset;
│ │ │ │ +
100jmp_buf *Vnm_signalInit(void);
│ │ │ │
101
│ │ │ │ -
102/****************************************************************/
│ │ │ │ -
103/* Class Vset: Inlineable method (vset.c) */
│ │ │ │ -
104/****************************************************************/
│ │ │ │ -
105
│ │ │ │ -
106#if !defined(VINLINE_MALOC)
│ │ │ │ -
115 int Vset_num(Vset *thee);
│ │ │ │ -
116
│ │ │ │ -
126 char *Vset_access(Vset *thee, int i);
│ │ │ │ -
127
│ │ │ │ -
136 char *Vset_create(Vset *thee);
│ │ │ │ +
109void Vnm_regHand(void);
│ │ │ │ +
110
│ │ │ │ +
119void Vnm_sigHand(int num);
│ │ │ │ +
120
│ │ │ │ +
125#define VPOW_SAFE(x,y) (Vnm_powsafe(x,y))
│ │ │ │ +
126
│ │ │ │ +
136double Vnm_powsafe(double x, double y);
│ │ │ │
137
│ │ │ │ -
146 char *Vset_first(Vset *thee);
│ │ │ │ -
147
│ │ │ │ -
156 char *Vset_last(Vset *thee);
│ │ │ │ -
157
│ │ │ │ -
166 char *Vset_next(Vset *thee);
│ │ │ │ -
167
│ │ │ │ -
176 char *Vset_prev(Vset *thee);
│ │ │ │ -
177
│ │ │ │ -
186 char *Vset_peekFirst(Vset *thee);
│ │ │ │ -
187
│ │ │ │ -
196 char *Vset_peekLast(Vset *thee);
│ │ │ │ -
197
│ │ │ │ -
206 void Vset_destroy(Vset *thee);
│ │ │ │ -
207#else /* if defined(VINLINE_MALOC) */
│ │ │ │ -
216# define Vset_num(thee) ((thee)->numT)
│ │ │ │ -
217
│ │ │ │ -
227# define Vset_access(thee,i) ( \
│ │ │ │ -
228 ((i >= 0) && (i < thee->numT)) \
│ │ │ │ -
229 ? &((thee)->table[ (i)>>(thee)->blockPower ] \
│ │ │ │ -
230 [ (thee)->sizeT*((i)&(thee)->blockModulo) ]) \
│ │ │ │ -
231 : VNULL \
│ │ │ │ -
232 )
│ │ │ │ -
233
│ │ │ │ -
242# define Vset_create(thee) ( \
│ │ │ │ -
243 ( ((((thee)->numT)>>(thee)->blockPower) >= (thee)->numBlocks) \
│ │ │ │ -
244 || ((((thee)->numT+1)%(thee)->prtT) == 0) ) \
│ │ │ │ -
245 ? (Vset_createLast((thee))) \
│ │ │ │ -
246 : (++((thee)->numT), (Vset_access((thee),(thee)->numT-1))) \
│ │ │ │ -
247 )
│ │ │ │ +
145void Vnm_typeChk(void);
│ │ │ │ +
146
│ │ │ │ +
160double Vnm_epsmac(void);
│ │ │ │ +
161
│ │ │ │ +
196int Vnm_gentokens(char *buf, char **argv,
│ │ │ │ +
197 const int argvmax, const char *white, const char *comment);
│ │ │ │ +
198
│ │ │ │ +
203#define VTIMERS 100
│ │ │ │ +
204
│ │ │ │ +
214void Vnm_tstart(int timer, const char *name);
│ │ │ │ +
215
│ │ │ │ +
225void Vnm_tstop(int timer, const char *name);
│ │ │ │ +
226
│ │ │ │ +
236char *Vnm_getuser(char *user, int usermax);
│ │ │ │ +
237
│ │ │ │ +
247char *Vnm_getos(char *os, int osmax);
│ │ │ │
248
│ │ │ │ -
257# define Vset_first(thee) ( \
│ │ │ │ -
258 (thee)->curT = 0, \
│ │ │ │ -
259 Vset_access((thee), (thee)->curT) \
│ │ │ │ -
260 )
│ │ │ │ -
261
│ │ │ │ -
270# define Vset_last(thee) ( \
│ │ │ │ -
271 (thee)->curT = (thee)->numT-1, \
│ │ │ │ -
272 Vset_access((thee), (thee)->curT) \
│ │ │ │ -
273 )
│ │ │ │ -
274
│ │ │ │ -
283# define Vset_next(thee) ( \
│ │ │ │ -
284 (thee)->curT++, \
│ │ │ │ -
285 ((thee)->curT < (thee)->numT) \
│ │ │ │ -
286 ? Vset_access((thee), (thee)->curT) \
│ │ │ │ -
287 : VNULL \
│ │ │ │ -
288 )
│ │ │ │ -
289
│ │ │ │ -
298# define Vset_prev(thee) ( \
│ │ │ │ -
299 (thee)->curT--, \
│ │ │ │ -
300 ((thee)->curT >= 0) \
│ │ │ │ -
301 ? Vset_access((thee), (thee)->curT) \
│ │ │ │ -
302 : VNULL \
│ │ │ │ -
303 )
│ │ │ │ -
304
│ │ │ │ -
313# define Vset_peekFirst(thee) ( \
│ │ │ │ -
314 Vset_access((thee), 0) \
│ │ │ │ -
315 )
│ │ │ │ -
316
│ │ │ │ -
325# define Vset_peekLast(thee) ( \
│ │ │ │ -
326 Vset_access((thee), (thee)->numT-1) \
│ │ │ │ -
327 )
│ │ │ │ +
258char *Vnm_gethost(char *host, int hostmax);
│ │ │ │ +
259
│ │ │ │ +
279char *Vnm_gethome(char *path, int pathmax);
│ │ │ │ +
280
│ │ │ │ +
297char *Vnm_getcwd(char *path, int pathmax);
│ │ │ │ +
298
│ │ │ │ +
307int Vnm_chdir(const char *path);
│ │ │ │ +
308
│ │ │ │ +
317int Vnm_mkdir(const char *path);
│ │ │ │ +
318
│ │ │ │ +
327int Vnm_system(const char *cmd);
│ │ │ │
328
│ │ │ │ -
337# define Vset_destroy(thee) ( \
│ │ │ │ -
338 ( ((((thee)->numT-1)>>(thee)->blockPower) < (thee)->numBlocks-1) \
│ │ │ │ -
339 || ((thee)->numT == 1) || ((((thee)->numT)%(thee)->prtT) == 0) ) \
│ │ │ │ -
340 ? (Vset_destroyLast((thee))) : (void)(((thee)->numT)--) \
│ │ │ │ -
341 )
│ │ │ │ -
342#endif /* if !defined(VINLINE_MALOC) */
│ │ │ │ -
343
│ │ │ │ - │ │ │ │ -
357 const char *tname, int tsize, int tmaxNum, int ioKey);
│ │ │ │ -
358
│ │ │ │ -
367void Vset_dtor(Vset **thee);
│ │ │ │ -
368
│ │ │ │ - │ │ │ │ -
378
│ │ │ │ - │ │ │ │ -
388
│ │ │ │ -
397void Vset_initData(Vset *thee);
│ │ │ │ -
398
│ │ │ │ -
407void Vset_reset(Vset *thee);
│ │ │ │ -
408
│ │ │ │ -
422void Vset_check(Vset *thee,
│ │ │ │ -
423 int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd);
│ │ │ │ -
424
│ │ │ │ -
433void Vset_memChk(Vset *thee);
│ │ │ │ -
434
│ │ │ │ -
435#endif /* _VSET_H_ */
│ │ │ │ -
436
│ │ │ │ +
337int Vnm_systemBack(const char *cmd);
│ │ │ │ +
338
│ │ │ │ +
347int Vnm_systemKill(const char *cmd);
│ │ │ │ +
348
│ │ │ │ +
359int Vnm_exec(int argc, char **argv);
│ │ │ │ +
360
│ │ │ │ +
371void Vnm_sleep(int nusecs);
│ │ │ │ +
372
│ │ │ │ +
380int Vnm_ioTag(void);
│ │ │ │ +
381
│ │ │ │ +
389int Vnm_nTags(void);
│ │ │ │ +
390
│ │ │ │ +
400void Vnm_setIoTag(int myTag, int numTags);
│ │ │ │ +
401
│ │ │ │ +
429FILE *Vnm_open(const int unit);
│ │ │ │ +
430
│ │ │ │ +
440int Vnm_close(const int unit);
│ │ │ │ +
441
│ │ │ │ +
451void Vnm_flush(const int unit);
│ │ │ │ +
452
│ │ │ │ +
463void Vnm_redirect(const int flag);
│ │ │ │ +
464
│ │ │ │ +
475void Vnm_print(const int unit, const char *format, ...);
│ │ │ │ +
476
│ │ │ │ +
490void Vnm_tprint(const int unit, const char *format, ...);
│ │ │ │ +
491
│ │ │ │ +
501void Vnm_qsort(int *u, int size);
│ │ │ │ +
502
│ │ │ │ +
513void Vnm_qsortOrd(int *u, int *ord, int size);
│ │ │ │ +
514
│ │ │ │ +
524void Vnm_dqsort(double *u, int size);
│ │ │ │ +
525
│ │ │ │ +
536void Vnm_dqsortOrd(double *u, int *ord, int size);
│ │ │ │ +
537
│ │ │ │ +
538#endif /* _VNM_H_ */
│ │ │ │ +
539
│ │ │ │
The base (or foundation) header for MALOC.
│ │ │ │ -
#define VMAX_ARGLEN
Global constant.
Definition maloc_base.h:227
│ │ │ │ -
Header file for an ISO C [V]irtual [N]umerical [M]achine.
│ │ │ │ -
Class Vmem: A safer, object-oriented, malloc/free object.
│ │ │ │ -
char * Vset_peekFirst(Vset *thee)
Return the first object in the set.
│ │ │ │ -
char * Vset_prev(Vset *thee)
Return the prev object in the set.
│ │ │ │ -
void Vset_dtor(Vset **thee)
Destroy the set object.
│ │ │ │ -
char * Vset_first(Vset *thee)
Return the first object in the set.
│ │ │ │ -
Vset * Vset_ctor(Vmem *vmem, const char *tname, int tsize, int tmaxNum, int ioKey)
Construct the set object.
│ │ │ │ -
void Vset_reset(Vset *thee)
Release all Ram controlled by this (thee) and re-initialize.
│ │ │ │ -
char * Vset_next(Vset *thee)
Return the next object in the set.
│ │ │ │ -
void Vset_initData(Vset *thee)
Initialize the Vset data (thee).
│ │ │ │ -
void Vset_destroyLast(Vset *thee)
Free up the object currently on the end of the list.
│ │ │ │ -
char * Vset_create(Vset *thee)
Create an object on the end of the list.
│ │ │ │ -
void Vset_memChk(Vset *thee)
Print the exact current malloc usage.
│ │ │ │ -
void Vset_check(Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd)
Get and return the RAM Control Block (thee) information.
│ │ │ │ -
int Vset_num(Vset *thee)
Return the number of things currently in the list.
│ │ │ │ -
char * Vset_peekLast(Vset *thee)
Return the last object in the set.
│ │ │ │ -
char * Vset_last(Vset *thee)
Return the last object in the set.
│ │ │ │ -
void Vset_destroy(Vset *thee)
Delete an object from the end of the list.
│ │ │ │ -
char * Vset_createLast(Vset *thee)
Create an object on the end of the list.
│ │ │ │ -
char * Vset_access(Vset *thee, int i)
Access an object in an arbitrary place in the list.
│ │ │ │ -
Contains public data members for Vmem class.
Definition vmem.h:57
│ │ │ │ -
Contains public data members for Vset class.
Definition vset.h:57
│ │ │ │ -
int blockModulo
=blockSize-1; for determining which block fast
Definition vset.h:88
│ │ │ │ -
char nameT[VMAX_ARGLEN]
name of object we are managing
Definition vset.h:68
│ │ │ │ -
int iMadeVmem
did i make vmem or was it inherited
Definition vset.h:62
│ │ │ │ -
int blockSize
blocksize is 2^(blockPower)
Definition vset.h:84
│ │ │ │ -
char ** table
list of pointers to blocks of storage we manage
Definition vset.h:91
│ │ │ │ -
int numBlocks
total number of allocated blocks
Definition vset.h:73
│ │ │ │ -
int prtT
for i/o at appropriate block creation/deletion
Definition vset.h:77
│ │ │ │ -
Vmem * vmem
the memory manager
Definition vset.h:60
│ │ │ │ -
int curT
the current "T" object in our collection
Definition vset.h:65
│ │ │ │ -
int blockMax
num blocks = blockMax=(maxObjects/blockSize)
Definition vset.h:86
│ │ │ │ -
int sizeT
size of the object in bytes
Definition vset.h:70
│ │ │ │ -
int blockPower
power of 2 for blocksize (e.g., =10, or =16)
Definition vset.h:82
│ │ │ │ -
int maxObjects
number of objects to manage (user specified)
Definition vset.h:80
│ │ │ │ -
int numT
the global "T" counter – how many "T"s in list
Definition vset.h:75
│ │ │ │ +
int Vnm_mkdir(const char *path)
Interact with the system to make a new directory.
│ │ │ │ +
void Vnm_sigHand(int num)
Handle events such as SIGINT. We must have first been registered with "Vnm_signalInit".
│ │ │ │ +
int Vnm_close(const int unit)
Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ +
char * Vnm_getos(char *os, int osmax)
Ask the system for the operating system name.
│ │ │ │ +
int Vnm_ioTag(void)
Return my I/O tag.
│ │ │ │ +
void Vnm_print(const int unit, const char *format,...)
External interface to the console i/o routine. We MUST NOT use VASSERT (or Vnm_print!...
│ │ │ │ +
void Vnm_setIoTag(int myTag, int numTags)
Set my id.
│ │ │ │ +
double Vnm_powsafe(double x, double y)
A safe VPOW function (avoids division by zero).
│ │ │ │ +
void Vnm_qsortOrd(int *u, int *ord, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
int Vnm_nTags(void)
Return the total number of tags.
│ │ │ │ +
void Vnm_sigIntClear(void)
Signal and setjmp handling routine. Clear the signal interrupt flag.
│ │ │ │ +
void Vnm_flush(const int unit)
Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ +
FILE * Vnm_open(const int unit)
Open an I/O console.
│ │ │ │ +
int Vnm_sigInt(void)
Signal and setjmp handling routine. Return the signal interrupt flag.
│ │ │ │ +
int Vnm_system(const char *cmd)
An improved ANSI-C "system" call.
│ │ │ │ +
int Vnm_exec(int argc, char **argv)
An improved UNIX "exec" call. This routine does not return except on error.
│ │ │ │ +
void Vnm_dqsortOrd(double *u, int *ord, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
void Vnm_jmpOkSet(void)
Signal and setjmp handling routine. Set the "okay-to-jump" flag.
│ │ │ │ +
void Vnm_tstart(int timer, const char *name)
Starts the timer on the particular machine.
│ │ │ │ +
char * Vnm_gethost(char *host, int hostmax)
Ask the system for the hostname.
│ │ │ │ +
void Vnm_sleep(int nusecs)
Implement a sleep function with microsecond resolution.
│ │ │ │ +
void Vnm_jmpOkClear(void)
Signal and setjmp handling routine. Clear the "okay-to-jump" flag.
│ │ │ │ +
jmp_buf * Vnm_signalInit(void)
Initialize the signal handling data structures.
│ │ │ │ +
int Vnm_chdir(const char *path)
Interact with the system to change the working directory.
│ │ │ │ +
void Vnm_typeChk(void)
Check out the sizes of various datatypes.
│ │ │ │ +
int Vnm_jmpOk(void)
Signal and setjmp handling routine. Return the "ok-to-jump" flag.
│ │ │ │ +
void Vnm_tprint(const int unit, const char *format,...)
Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in this routine.
│ │ │ │ +
char * Vnm_gethome(char *path, int pathmax)
Ask the system for the home directory.
│ │ │ │ +
double Vnm_epsmac(void)
Computes the unit roundoff of the machine in single precision. This is defined as the smallest posi...
│ │ │ │ +
int Vnm_systemBack(const char *cmd)
A background variant of the ANSI-C "system" call.
│ │ │ │ +
int Vnm_gentokens(char *buf, char **argv, const int argvmax, const char *white, const char *comment)
Generate an [argv,argc] pair from a character string "buf" (assumed NULL-terminated) in which tokens ...
│ │ │ │ +
int Vnm_systemKill(const char *cmd)
Something like a UNIX "killall" call.
│ │ │ │ +
void Vnm_qsort(int *u, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
void Vnm_sigIntSet(void)
Signal and setjmp handling routine. Set the signal interrupt flag.
│ │ │ │ +
void Vnm_redirect(const int flag)
Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the file: ${MCSH_HOME}/io....
│ │ │ │ +
char * Vnm_getcwd(char *path, int pathmax)
Ask the system for the current working directory.
│ │ │ │ +
char * Vnm_getuser(char *user, int usermax)
Ask the system for the username.
│ │ │ │ +
void Vnm_regHand(void)
Register the signal handler with the operating system.
│ │ │ │ +
void Vnm_dqsort(double *u, int size)
Front-end to quick sort integer array from [-large] to [+large].
│ │ │ │ +
void Vnm_tstop(int timer, const char *name)
Stops the timer on the particular machine.
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── encoding │ │ │ │ │ @@ -1 +1 @@ │ │ │ │ │ -utf-8 │ │ │ │ │ +us-ascii │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -3,283 +3,236 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ MALOC 0.1 │ │ │ │ │ │ │ │ │ │ * src │ │ │ │ │ * vsys │ │ │ │ │ * maloc │ │ │ │ │ -vset.h │ │ │ │ │ +vnm.h │ │ │ │ │ Go_to_the_documentation_of_this_file. │ │ │ │ │ 1 │ │ │ │ │ - 38#ifndef _VSET_H_ │ │ │ │ │ - 39#define _VSET_H_ │ │ │ │ │ - 40 │ │ │ │ │ - 41#include │ │ │ │ │ - 42 │ │ │ │ │ - 43#include │ │ │ │ │ - 44#include │ │ │ │ │ - 45 │ │ │ │ │ - 46/* │ │ │ │ │ - 47 * │ │ │ │ │ -*************************************************************************** │ │ │ │ │ - 48 * Class Vset: Parameters and datatypes │ │ │ │ │ - 49 * │ │ │ │ │ -*************************************************************************** │ │ │ │ │ - 50 */ │ │ │ │ │ - 51 │ │ │ │ │ -57struct sVset { │ │ │ │ │ - 58 │ │ │ │ │ -60 Vmem *vmem; │ │ │ │ │ -62 int iMadeVmem; │ │ │ │ │ - 63 │ │ │ │ │ -65 int curT; │ │ │ │ │ - 66 │ │ │ │ │ -68 char nameT[VMAX_ARGLEN]; │ │ │ │ │ -70 int sizeT; │ │ │ │ │ - 71 │ │ │ │ │ -73 int numBlocks; │ │ │ │ │ -75 int numT; │ │ │ │ │ -77 int prtT; │ │ │ │ │ - 78 │ │ │ │ │ -80 int maxObjects; │ │ │ │ │ -82 int blockPower; │ │ │ │ │ -84 int blockSize; │ │ │ │ │ -86 int blockMax; │ │ │ │ │ -88 int blockModulo; │ │ │ │ │ - 89 │ │ │ │ │ -91 char **table; │ │ │ │ │ + 33#ifndef _VNM_H_ │ │ │ │ │ + 34#define _VNM_H_ │ │ │ │ │ + 35 │ │ │ │ │ + 36#include │ │ │ │ │ + 37 │ │ │ │ │ + 38 │ │ │ │ │ +46int Vnm_sigInt(void); │ │ │ │ │ + 47 │ │ │ │ │ +55void Vnm_sigIntSet(void); │ │ │ │ │ + 56 │ │ │ │ │ +64void Vnm_sigIntClear(void); │ │ │ │ │ + 65 │ │ │ │ │ +73int Vnm_jmpOk(void); │ │ │ │ │ + 74 │ │ │ │ │ +82void Vnm_jmpOkSet(void); │ │ │ │ │ + 83 │ │ │ │ │ +91void Vnm_jmpOkClear(void); │ │ │ │ │ 92 │ │ │ │ │ - 93}; │ │ │ │ │ - 94 │ │ │ │ │ -100typedef struct sVset Vset; │ │ │ │ │ +100jmp_buf *Vnm_signalInit(void); │ │ │ │ │ 101 │ │ │ │ │ - 102/****************************************************************/ │ │ │ │ │ - 103/* Class Vset: Inlineable method (vset.c) */ │ │ │ │ │ - 104/****************************************************************/ │ │ │ │ │ - 105 │ │ │ │ │ - 106#if !defined(VINLINE_MALOC) │ │ │ │ │ -115 int Vset_num(Vset *thee); │ │ │ │ │ - 116 │ │ │ │ │ -126 char *Vset_access(Vset *thee, int i); │ │ │ │ │ - 127 │ │ │ │ │ -136 char *Vset_create(Vset *thee); │ │ │ │ │ +109void Vnm_regHand(void); │ │ │ │ │ + 110 │ │ │ │ │ +119void Vnm_sigHand(int num); │ │ │ │ │ + 120 │ │ │ │ │ +125#define VPOW_SAFE(x,y) (Vnm_powsafe(x,y)) │ │ │ │ │ + 126 │ │ │ │ │ +136double Vnm_powsafe(double x, double y); │ │ │ │ │ 137 │ │ │ │ │ -146 char *Vset_first(Vset *thee); │ │ │ │ │ - 147 │ │ │ │ │ -156 char *Vset_last(Vset *thee); │ │ │ │ │ - 157 │ │ │ │ │ -166 char *Vset_next(Vset *thee); │ │ │ │ │ - 167 │ │ │ │ │ -176 char *Vset_prev(Vset *thee); │ │ │ │ │ - 177 │ │ │ │ │ -186 char *Vset_peekFirst(Vset *thee); │ │ │ │ │ - 187 │ │ │ │ │ -196 char *Vset_peekLast(Vset *thee); │ │ │ │ │ - 197 │ │ │ │ │ -206 void Vset_destroy(Vset *thee); │ │ │ │ │ - 207#else /* if defined(VINLINE_MALOC) */ │ │ │ │ │ - 216# define Vset_num(thee) ((thee)->numT) │ │ │ │ │ - 217 │ │ │ │ │ - 227# define Vset_access(thee,i) ( \ │ │ │ │ │ - 228 ((i >= 0) && (i < thee->numT)) \ │ │ │ │ │ - 229 ? &((thee)->table[ (i)>>(thee)->blockPower ] \ │ │ │ │ │ - 230 [ (thee)->sizeT*((i)&(thee)->blockModulo) ]) \ │ │ │ │ │ - 231 : VNULL \ │ │ │ │ │ - 232 ) │ │ │ │ │ - 233 │ │ │ │ │ - 242# define Vset_create(thee) ( \ │ │ │ │ │ - 243 ( ((((thee)->numT)>>(thee)->blockPower) >= (thee)->numBlocks) \ │ │ │ │ │ - 244 || ((((thee)->numT+1)%(thee)->prtT) == 0) ) \ │ │ │ │ │ - 245 ? (Vset_createLast((thee))) \ │ │ │ │ │ - 246 : (++((thee)->numT), (Vset_access((thee),(thee)->numT-1))) \ │ │ │ │ │ - 247 ) │ │ │ │ │ +145void Vnm_typeChk(void); │ │ │ │ │ + 146 │ │ │ │ │ +160double Vnm_epsmac(void); │ │ │ │ │ + 161 │ │ │ │ │ +196int Vnm_gentokens(char *buf, char **argv, │ │ │ │ │ + 197 const int argvmax, const char *white, const char *comment); │ │ │ │ │ + 198 │ │ │ │ │ +203#define VTIMERS 100 │ │ │ │ │ + 204 │ │ │ │ │ +214void Vnm_tstart(int timer, const char *name); │ │ │ │ │ + 215 │ │ │ │ │ +225void Vnm_tstop(int timer, const char *name); │ │ │ │ │ + 226 │ │ │ │ │ +236char *Vnm_getuser(char *user, int usermax); │ │ │ │ │ + 237 │ │ │ │ │ +247char *Vnm_getos(char *os, int osmax); │ │ │ │ │ 248 │ │ │ │ │ - 257# define Vset_first(thee) ( \ │ │ │ │ │ - 258 (thee)->curT = 0, \ │ │ │ │ │ - 259 Vset_access((thee), (thee)->curT) \ │ │ │ │ │ - 260 ) │ │ │ │ │ - 261 │ │ │ │ │ - 270# define Vset_last(thee) ( \ │ │ │ │ │ - 271 (thee)->curT = (thee)->numT-1, \ │ │ │ │ │ - 272 Vset_access((thee), (thee)->curT) \ │ │ │ │ │ - 273 ) │ │ │ │ │ - 274 │ │ │ │ │ - 283# define Vset_next(thee) ( \ │ │ │ │ │ - 284 (thee)->curT++, \ │ │ │ │ │ - 285 ((thee)->curT < (thee)->numT) \ │ │ │ │ │ - 286 ? Vset_access((thee), (thee)->curT) \ │ │ │ │ │ - 287 : VNULL \ │ │ │ │ │ - 288 ) │ │ │ │ │ - 289 │ │ │ │ │ - 298# define Vset_prev(thee) ( \ │ │ │ │ │ - 299 (thee)->curT--, \ │ │ │ │ │ - 300 ((thee)->curT >= 0) \ │ │ │ │ │ - 301 ? Vset_access((thee), (thee)->curT) \ │ │ │ │ │ - 302 : VNULL \ │ │ │ │ │ - 303 ) │ │ │ │ │ - 304 │ │ │ │ │ - 313# define Vset_peekFirst(thee) ( \ │ │ │ │ │ - 314 Vset_access((thee), 0) \ │ │ │ │ │ - 315 ) │ │ │ │ │ - 316 │ │ │ │ │ - 325# define Vset_peekLast(thee) ( \ │ │ │ │ │ - 326 Vset_access((thee), (thee)->numT-1) \ │ │ │ │ │ - 327 ) │ │ │ │ │ +258char *Vnm_gethost(char *host, int hostmax); │ │ │ │ │ + 259 │ │ │ │ │ +279char *Vnm_gethome(char *path, int pathmax); │ │ │ │ │ + 280 │ │ │ │ │ +297char *Vnm_getcwd(char *path, int pathmax); │ │ │ │ │ + 298 │ │ │ │ │ +307int Vnm_chdir(const char *path); │ │ │ │ │ + 308 │ │ │ │ │ +317int Vnm_mkdir(const char *path); │ │ │ │ │ + 318 │ │ │ │ │ +327int Vnm_system(const char *cmd); │ │ │ │ │ 328 │ │ │ │ │ - 337# define Vset_destroy(thee) ( \ │ │ │ │ │ - 338 ( ((((thee)->numT-1)>>(thee)->blockPower) < (thee)->numBlocks-1) \ │ │ │ │ │ - 339 || ((thee)->numT == 1) || ((((thee)->numT)%(thee)->prtT) == 0) ) \ │ │ │ │ │ - 340 ? (Vset_destroyLast((thee))) : (void)(((thee)->numT)--) \ │ │ │ │ │ - 341 ) │ │ │ │ │ - 342#endif /* if !defined(VINLINE_MALOC) */ │ │ │ │ │ - 343 │ │ │ │ │ -356Vset* Vset_ctor(Vmem *vmem, │ │ │ │ │ - 357 const char *tname, int tsize, int tmaxNum, int ioKey); │ │ │ │ │ - 358 │ │ │ │ │ -367void Vset_dtor(Vset **thee); │ │ │ │ │ - 368 │ │ │ │ │ -377char *Vset_createLast(Vset *thee); │ │ │ │ │ - 378 │ │ │ │ │ -387void Vset_destroyLast(Vset *thee); │ │ │ │ │ - 388 │ │ │ │ │ -397void Vset_initData(Vset *thee); │ │ │ │ │ - 398 │ │ │ │ │ -407void Vset_reset(Vset *thee); │ │ │ │ │ - 408 │ │ │ │ │ -422void Vset_check(Vset *thee, │ │ │ │ │ - 423 int *tnum, int *tsize, int *tVecUse, int *tVecMal, int *tVecOhd); │ │ │ │ │ - 424 │ │ │ │ │ -433void Vset_memChk(Vset *thee); │ │ │ │ │ - 434 │ │ │ │ │ - 435#endif /* _VSET_H_ */ │ │ │ │ │ - 436 │ │ │ │ │ +337int Vnm_systemBack(const char *cmd); │ │ │ │ │ + 338 │ │ │ │ │ +347int Vnm_systemKill(const char *cmd); │ │ │ │ │ + 348 │ │ │ │ │ +359int Vnm_exec(int argc, char **argv); │ │ │ │ │ + 360 │ │ │ │ │ +371void Vnm_sleep(int nusecs); │ │ │ │ │ + 372 │ │ │ │ │ +380int Vnm_ioTag(void); │ │ │ │ │ + 381 │ │ │ │ │ +389int Vnm_nTags(void); │ │ │ │ │ + 390 │ │ │ │ │ +400void Vnm_setIoTag(int myTag, int numTags); │ │ │ │ │ + 401 │ │ │ │ │ +429FILE *Vnm_open(const int unit); │ │ │ │ │ + 430 │ │ │ │ │ +440int Vnm_close(const int unit); │ │ │ │ │ + 441 │ │ │ │ │ +451void Vnm_flush(const int unit); │ │ │ │ │ + 452 │ │ │ │ │ +463void Vnm_redirect(const int flag); │ │ │ │ │ + 464 │ │ │ │ │ +475void Vnm_print(const int unit, const char *format, ...); │ │ │ │ │ + 476 │ │ │ │ │ +490void Vnm_tprint(const int unit, const char *format, ...); │ │ │ │ │ + 491 │ │ │ │ │ +501void Vnm_qsort(int *u, int size); │ │ │ │ │ + 502 │ │ │ │ │ +513void Vnm_qsortOrd(int *u, int *ord, int size); │ │ │ │ │ + 514 │ │ │ │ │ +524void Vnm_dqsort(double *u, int size); │ │ │ │ │ + 525 │ │ │ │ │ +536void Vnm_dqsortOrd(double *u, int *ord, int size); │ │ │ │ │ + 537 │ │ │ │ │ + 538#endif /* _VNM_H_ */ │ │ │ │ │ + 539 │ │ │ │ │ maloc_base.h │ │ │ │ │ The base (or foundation) header for MALOC. │ │ │ │ │ -VMAX_ARGLEN │ │ │ │ │ -#define VMAX_ARGLEN │ │ │ │ │ -Global constant. │ │ │ │ │ -Definition maloc_base.h:227 │ │ │ │ │ -vnm.h │ │ │ │ │ -Header file for an ISO C [V]irtual [N]umerical [M]achine. │ │ │ │ │ -vmem.h │ │ │ │ │ -Class Vmem: A safer, object-oriented, malloc/free object. │ │ │ │ │ -Vset_peekFirst │ │ │ │ │ -char * Vset_peekFirst(Vset *thee) │ │ │ │ │ -Return the first object in the set. │ │ │ │ │ -Vset_prev │ │ │ │ │ -char * Vset_prev(Vset *thee) │ │ │ │ │ -Return the prev object in the set. │ │ │ │ │ -Vset_dtor │ │ │ │ │ -void Vset_dtor(Vset **thee) │ │ │ │ │ -Destroy the set object. │ │ │ │ │ -Vset_first │ │ │ │ │ -char * Vset_first(Vset *thee) │ │ │ │ │ -Return the first object in the set. │ │ │ │ │ -Vset_ctor │ │ │ │ │ -Vset * Vset_ctor(Vmem *vmem, const char *tname, int tsize, int tmaxNum, int │ │ │ │ │ -ioKey) │ │ │ │ │ -Construct the set object. │ │ │ │ │ -Vset_reset │ │ │ │ │ -void Vset_reset(Vset *thee) │ │ │ │ │ -Release all Ram controlled by this (thee) and re-initialize. │ │ │ │ │ -Vset_next │ │ │ │ │ -char * Vset_next(Vset *thee) │ │ │ │ │ -Return the next object in the set. │ │ │ │ │ -Vset_initData │ │ │ │ │ -void Vset_initData(Vset *thee) │ │ │ │ │ -Initialize the Vset data (thee). │ │ │ │ │ -Vset_destroyLast │ │ │ │ │ -void Vset_destroyLast(Vset *thee) │ │ │ │ │ -Free up the object currently on the end of the list. │ │ │ │ │ -Vset_create │ │ │ │ │ -char * Vset_create(Vset *thee) │ │ │ │ │ -Create an object on the end of the list. │ │ │ │ │ -Vset_memChk │ │ │ │ │ -void Vset_memChk(Vset *thee) │ │ │ │ │ -Print the exact current malloc usage. │ │ │ │ │ -Vset_check │ │ │ │ │ -void Vset_check(Vset *thee, int *tnum, int *tsize, int *tVecUse, int *tVecMal, │ │ │ │ │ -int *tVecOhd) │ │ │ │ │ -Get and return the RAM Control Block (thee) information. │ │ │ │ │ -Vset_num │ │ │ │ │ -int Vset_num(Vset *thee) │ │ │ │ │ -Return the number of things currently in the list. │ │ │ │ │ -Vset_peekLast │ │ │ │ │ -char * Vset_peekLast(Vset *thee) │ │ │ │ │ -Return the last object in the set. │ │ │ │ │ -Vset_last │ │ │ │ │ -char * Vset_last(Vset *thee) │ │ │ │ │ -Return the last object in the set. │ │ │ │ │ -Vset_destroy │ │ │ │ │ -void Vset_destroy(Vset *thee) │ │ │ │ │ -Delete an object from the end of the list. │ │ │ │ │ -Vset_createLast │ │ │ │ │ -char * Vset_createLast(Vset *thee) │ │ │ │ │ -Create an object on the end of the list. │ │ │ │ │ -Vset_access │ │ │ │ │ -char * Vset_access(Vset *thee, int i) │ │ │ │ │ -Access an object in an arbitrary place in the list. │ │ │ │ │ -sVmem │ │ │ │ │ -Contains public data members for Vmem class. │ │ │ │ │ -Definition vmem.h:57 │ │ │ │ │ -sVset │ │ │ │ │ -Contains public data members for Vset class. │ │ │ │ │ -Definition vset.h:57 │ │ │ │ │ -sVset::blockModulo │ │ │ │ │ -int blockModulo │ │ │ │ │ -=blockSize-1; for determining which block fast │ │ │ │ │ -Definition vset.h:88 │ │ │ │ │ -sVset::nameT │ │ │ │ │ -char nameT[VMAX_ARGLEN] │ │ │ │ │ -name of object we are managing │ │ │ │ │ -Definition vset.h:68 │ │ │ │ │ -sVset::iMadeVmem │ │ │ │ │ -int iMadeVmem │ │ │ │ │ -did i make vmem or was it inherited │ │ │ │ │ -Definition vset.h:62 │ │ │ │ │ -sVset::blockSize │ │ │ │ │ -int blockSize │ │ │ │ │ -blocksize is 2^(blockPower) │ │ │ │ │ -Definition vset.h:84 │ │ │ │ │ -sVset::table │ │ │ │ │ -char ** table │ │ │ │ │ -list of pointers to blocks of storage we manage │ │ │ │ │ -Definition vset.h:91 │ │ │ │ │ -sVset::numBlocks │ │ │ │ │ -int numBlocks │ │ │ │ │ -total number of allocated blocks │ │ │ │ │ -Definition vset.h:73 │ │ │ │ │ -sVset::prtT │ │ │ │ │ -int prtT │ │ │ │ │ -for i/o at appropriate block creation/deletion │ │ │ │ │ -Definition vset.h:77 │ │ │ │ │ -sVset::vmem │ │ │ │ │ -Vmem * vmem │ │ │ │ │ -the memory manager │ │ │ │ │ -Definition vset.h:60 │ │ │ │ │ -sVset::curT │ │ │ │ │ -int curT │ │ │ │ │ -the current "T" object in our collection │ │ │ │ │ -Definition vset.h:65 │ │ │ │ │ -sVset::blockMax │ │ │ │ │ -int blockMax │ │ │ │ │ -num blocks = blockMax=(maxObjects/blockSize) │ │ │ │ │ -Definition vset.h:86 │ │ │ │ │ -sVset::sizeT │ │ │ │ │ -int sizeT │ │ │ │ │ -size of the object in bytes │ │ │ │ │ -Definition vset.h:70 │ │ │ │ │ -sVset::blockPower │ │ │ │ │ -int blockPower │ │ │ │ │ -power of 2 for blocksize (e.g., =10, or =16) │ │ │ │ │ -Definition vset.h:82 │ │ │ │ │ -sVset::maxObjects │ │ │ │ │ -int maxObjects │ │ │ │ │ -number of objects to manage (user specified) │ │ │ │ │ -Definition vset.h:80 │ │ │ │ │ -sVset::numT │ │ │ │ │ -int numT │ │ │ │ │ -the global "T" counter – how many "T"s in list │ │ │ │ │ -Definition vset.h:75 │ │ │ │ │ +Vnm_mkdir │ │ │ │ │ +int Vnm_mkdir(const char *path) │ │ │ │ │ +Interact with the system to make a new directory. │ │ │ │ │ +Vnm_sigHand │ │ │ │ │ +void Vnm_sigHand(int num) │ │ │ │ │ +Handle events such as SIGINT. We must have first been registered with │ │ │ │ │ +"Vnm_signalInit". │ │ │ │ │ +Vnm_close │ │ │ │ │ +int Vnm_close(const int unit) │ │ │ │ │ +Close an I/O console. We MUST NOT use VASSERT (or Vnm_print!) in this routine. │ │ │ │ │ +Vnm_getos │ │ │ │ │ +char * Vnm_getos(char *os, int osmax) │ │ │ │ │ +Ask the system for the operating system name. │ │ │ │ │ +Vnm_ioTag │ │ │ │ │ +int Vnm_ioTag(void) │ │ │ │ │ +Return my I/O tag. │ │ │ │ │ +Vnm_print │ │ │ │ │ +void Vnm_print(const int unit, const char *format,...) │ │ │ │ │ +External interface to the console i/o routine. We MUST NOT use VASSERT (or │ │ │ │ │ +Vnm_print!... │ │ │ │ │ +Vnm_setIoTag │ │ │ │ │ +void Vnm_setIoTag(int myTag, int numTags) │ │ │ │ │ +Set my id. │ │ │ │ │ +Vnm_powsafe │ │ │ │ │ +double Vnm_powsafe(double x, double y) │ │ │ │ │ +A safe VPOW function (avoids division by zero). │ │ │ │ │ +Vnm_qsortOrd │ │ │ │ │ +void Vnm_qsortOrd(int *u, int *ord, int size) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ +Vnm_nTags │ │ │ │ │ +int Vnm_nTags(void) │ │ │ │ │ +Return the total number of tags. │ │ │ │ │ +Vnm_sigIntClear │ │ │ │ │ +void Vnm_sigIntClear(void) │ │ │ │ │ +Signal and setjmp handling routine. Clear the signal interrupt flag. │ │ │ │ │ +Vnm_flush │ │ │ │ │ +void Vnm_flush(const int unit) │ │ │ │ │ +Attempt to flush the specified i/o stream. We MUST NOT use VASSERT (or │ │ │ │ │ +Vnm_print!) in this routine. │ │ │ │ │ +Vnm_open │ │ │ │ │ +FILE * Vnm_open(const int unit) │ │ │ │ │ +Open an I/O console. │ │ │ │ │ +Vnm_sigInt │ │ │ │ │ +int Vnm_sigInt(void) │ │ │ │ │ +Signal and setjmp handling routine. Return the signal interrupt flag. │ │ │ │ │ +Vnm_system │ │ │ │ │ +int Vnm_system(const char *cmd) │ │ │ │ │ +An improved ANSI-C "system" call. │ │ │ │ │ +Vnm_exec │ │ │ │ │ +int Vnm_exec(int argc, char **argv) │ │ │ │ │ +An improved UNIX "exec" call. This routine does not return except on error. │ │ │ │ │ +Vnm_dqsortOrd │ │ │ │ │ +void Vnm_dqsortOrd(double *u, int *ord, int size) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ +Vnm_jmpOkSet │ │ │ │ │ +void Vnm_jmpOkSet(void) │ │ │ │ │ +Signal and setjmp handling routine. Set the "okay-to-jump" flag. │ │ │ │ │ +Vnm_tstart │ │ │ │ │ +void Vnm_tstart(int timer, const char *name) │ │ │ │ │ +Starts the timer on the particular machine. │ │ │ │ │ +Vnm_gethost │ │ │ │ │ +char * Vnm_gethost(char *host, int hostmax) │ │ │ │ │ +Ask the system for the hostname. │ │ │ │ │ +Vnm_sleep │ │ │ │ │ +void Vnm_sleep(int nusecs) │ │ │ │ │ +Implement a sleep function with microsecond resolution. │ │ │ │ │ +Vnm_jmpOkClear │ │ │ │ │ +void Vnm_jmpOkClear(void) │ │ │ │ │ +Signal and setjmp handling routine. Clear the "okay-to-jump" flag. │ │ │ │ │ +Vnm_signalInit │ │ │ │ │ +jmp_buf * Vnm_signalInit(void) │ │ │ │ │ +Initialize the signal handling data structures. │ │ │ │ │ +Vnm_chdir │ │ │ │ │ +int Vnm_chdir(const char *path) │ │ │ │ │ +Interact with the system to change the working directory. │ │ │ │ │ +Vnm_typeChk │ │ │ │ │ +void Vnm_typeChk(void) │ │ │ │ │ +Check out the sizes of various datatypes. │ │ │ │ │ +Vnm_jmpOk │ │ │ │ │ +int Vnm_jmpOk(void) │ │ │ │ │ +Signal and setjmp handling routine. Return the "ok-to-jump" flag. │ │ │ │ │ +Vnm_tprint │ │ │ │ │ +void Vnm_tprint(const int unit, const char *format,...) │ │ │ │ │ +Add our ioTag to Vnm_print output. We MUST NOT use VASSERT (or Vnm_print!) in │ │ │ │ │ +this routine. │ │ │ │ │ +Vnm_gethome │ │ │ │ │ +char * Vnm_gethome(char *path, int pathmax) │ │ │ │ │ +Ask the system for the home directory. │ │ │ │ │ +Vnm_epsmac │ │ │ │ │ +double Vnm_epsmac(void) │ │ │ │ │ +Computes the unit roundoff of the machine in single precision. This is defined │ │ │ │ │ +as the smallest posi... │ │ │ │ │ +Vnm_systemBack │ │ │ │ │ +int Vnm_systemBack(const char *cmd) │ │ │ │ │ +A background variant of the ANSI-C "system" call. │ │ │ │ │ +Vnm_gentokens │ │ │ │ │ +int Vnm_gentokens(char *buf, char **argv, const int argvmax, const char *white, │ │ │ │ │ +const char *comment) │ │ │ │ │ +Generate an [argv,argc] pair from a character string "buf" (assumed NULL- │ │ │ │ │ +terminated) in which tokens ... │ │ │ │ │ +Vnm_systemKill │ │ │ │ │ +int Vnm_systemKill(const char *cmd) │ │ │ │ │ +Something like a UNIX "killall" call. │ │ │ │ │ +Vnm_qsort │ │ │ │ │ +void Vnm_qsort(int *u, int size) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ +Vnm_sigIntSet │ │ │ │ │ +void Vnm_sigIntSet(void) │ │ │ │ │ +Signal and setjmp handling routine. Set the signal interrupt flag. │ │ │ │ │ +Vnm_redirect │ │ │ │ │ +void Vnm_redirect(const int flag) │ │ │ │ │ +Set/unset the redirect flag for UNIT zero. When redirected, I/O goes to the │ │ │ │ │ +file: ${MCSH_HOME}/io.... │ │ │ │ │ +Vnm_getcwd │ │ │ │ │ +char * Vnm_getcwd(char *path, int pathmax) │ │ │ │ │ +Ask the system for the current working directory. │ │ │ │ │ +Vnm_getuser │ │ │ │ │ +char * Vnm_getuser(char *user, int usermax) │ │ │ │ │ +Ask the system for the username. │ │ │ │ │ +Vnm_regHand │ │ │ │ │ +void Vnm_regHand(void) │ │ │ │ │ +Register the signal handler with the operating system. │ │ │ │ │ +Vnm_dqsort │ │ │ │ │ +void Vnm_dqsort(double *u, int size) │ │ │ │ │ +Front-end to quick sort integer array from [-large] to [+large]. │ │ │ │ │ +Vnm_tstop │ │ │ │ │ +void Vnm_tstop(int timer, const char *name) │ │ │ │ │ +Stops the timer on the particular machine. │ │ │ │ │ │ │ │ │ │ =============================================================================== │ │ │ │ │ Generated by [doxygen] 1.9.8 │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00024.dot.gz │ │ │ │ ├── a00024.dot │ │ │ │ │ @@ -1,14 +1,14 @@ │ │ │ │ │ -digraph "vset.h" │ │ │ │ │ +digraph "vnm.h" │ │ │ │ │ { │ │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ │ bgcolor="transparent"; │ │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ │ - Node1 [id="Node000001",label="vset.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ │ + Node1 [id="Node000001",label="vnm.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node2 [id="Node000002",label="maloc/maloc_base.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00002.html",tooltip="The base (or foundation) header for MALOC."]; │ │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node3 [id="Node000003",label="assert.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node4 [id="edge3_Node000002_Node000004",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node4 [id="Node000004",label="ctype.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node5 [id="edge4_Node000002_Node000005",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ @@ -33,14 +33,8 @@ │ │ │ │ │ Node14 [id="Node000014",label="stdlib.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node15 [id="edge14_Node000002_Node000015",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node15 [id="Node000015",label="string.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node16 [id="edge15_Node000002_Node000016",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node16 [id="Node000016",label="time.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ Node2 -> Node17 [id="edge16_Node000002_Node000017",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ Node17 [id="Node000017",label="setjmp.h",height=0.2,width=0.4,color="grey60", fillcolor="#E0E0E0", style="filled",tooltip=" "]; │ │ │ │ │ - Node1 -> Node18 [id="edge17_Node000001_Node000018",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node18 [id="Node000018",label="maloc/vnm.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ │ - Node18 -> Node2 [id="edge18_Node000018_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node1 -> Node19 [id="edge19_Node000001_Node000019",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ - Node19 [id="Node000019",label="maloc/vmem.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00026.html",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ │ - Node19 -> Node2 [id="edge20_Node000019_Node000002",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00025.dot │ │ │ │ @@ -1,28 +1,34 @@ │ │ │ │ -digraph "vset.h" │ │ │ │ +digraph "vnm.h" │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ - Node1 [id="Node000001",label="vset.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ + Node1 [id="Node000001",label="vnm.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Header file for an ISO C [V]irtual [N]umerical [M]achine."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ + Node2 [id="Node000002",label="vio.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00029.html",tooltip="Class Vio: virtual I/O layer."]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node3 [id="Node000003",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ - Node2 -> Node4 [id="edge3_Node000002_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node4 [id="Node000004",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ - Node4 -> Node3 [id="edge4_Node000004_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 -> Node5 [id="edge5_Node000002_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node5 [id="Node000005",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ - Node5 -> Node6 [id="edge6_Node000005_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node6 [id="Node000006",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ - Node6 -> Node4 [id="edge7_Node000006_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 -> Node6 [id="edge8_Node000002_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 -> Node7 [id="edge9_Node000002_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node7 [id="Node000007",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ - Node7 -> Node6 [id="edge10_Node000007_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 -> Node8 [id="edge11_Node000002_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node8 [id="Node000008",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ - Node8 -> Node3 [id="edge12_Node000008_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node8 -> Node4 [id="edge13_Node000008_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 [id="Node000003",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ + Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ + Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node5 [id="Node000005",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ + Node5 -> Node4 [id="edge5_Node000005_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 -> Node6 [id="edge6_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node6 [id="Node000006",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ + Node6 -> Node7 [id="edge7_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node7 [id="Node000007",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node7 -> Node5 [id="edge8_Node000007_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 -> Node7 [id="edge9_Node000003_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 -> Node8 [id="edge10_Node000003_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ + Node8 -> Node7 [id="edge11_Node000008_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node3 -> Node9 [id="edge12_Node000003_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node9 [id="Node000009",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ + Node9 -> Node4 [id="edge13_Node000009_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node9 -> Node5 [id="edge14_Node000009_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node1 -> Node10 [id="edge15_Node000001_Node000010",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node10 [id="Node000010",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ + Node10 -> Node3 [id="edge16_Node000010_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ + Node1 -> Node3 [id="edge17_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00028.dot │ │ │ │ @@ -2,30 +2,30 @@ │ │ │ │ { │ │ │ │ // LATEX_PDF_SIZE │ │ │ │ bgcolor="transparent"; │ │ │ │ edge [fontname=FreeSans,fontsize=10,labelfontname=FreeSans,labelfontsize=10]; │ │ │ │ node [fontname=FreeSans,fontsize=10,shape=box,height=0.2,width=0.4]; │ │ │ │ Node1 [id="Node000001",label="vmem.h",height=0.2,width=0.4,color="gray40", fillcolor="grey60", style="filled", fontcolor="black",tooltip="Class Vmem: A safer, object-oriented, malloc/free object."]; │ │ │ │ Node1 -> Node2 [id="edge1_Node000001_Node000002",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node2 [id="Node000002",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00023.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ + Node2 [id="Node000002",label="vset.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00020.html",tooltip="Class Vset: a dynamic set object."]; │ │ │ │ Node2 -> Node3 [id="edge2_Node000002_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 [id="Node000003",label="vsys.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00035.html",tooltip="The primary header for VSYS. (Virtual SYStem utilities library.)"]; │ │ │ │ Node3 -> Node4 [id="edge3_Node000003_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node4 [id="Node000004",label="maloc.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00038.html",tooltip="The foundation header for MALOC."]; │ │ │ │ Node3 -> Node5 [id="edge4_Node000003_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node5 [id="Node000005",label="psh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00008.html",tooltip="Header file for a simple parallel extension of ALOC's VSH."]; │ │ │ │ Node5 -> Node4 [id="edge5_Node000005_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 -> Node6 [id="edge6_Node000003_Node000006",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node6 [id="Node000006",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ + Node6 [id="Node000006",label="vcom.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vcom: virtual (currently just MPI) communications layer."]; │ │ │ │ Node6 -> Node7 [id="edge7_Node000006_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node7 [id="Node000007",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00011.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ + Node7 [id="Node000007",label="vmp.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmp: a Virtual MPI communication layer object."]; │ │ │ │ Node7 -> Node5 [id="edge8_Node000007_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 -> Node7 [id="edge9_Node000003_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 -> Node8 [id="edge10_Node000003_Node000008",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ - Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00005.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ + Node8 [id="Node000008",label="vmpi.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00014.html",tooltip="Class Vmpi: a Virtual MPI communication layer object."]; │ │ │ │ Node8 -> Node7 [id="edge11_Node000008_Node000007",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node3 -> Node9 [id="edge12_Node000003_Node000009",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node9 [id="Node000009",label="vsh.h",height=0.2,width=0.4,color="grey40", fillcolor="white", style="filled",URL="$a00017.html",tooltip="Header file for vsh, a bourne-compatible shell."]; │ │ │ │ Node9 -> Node4 [id="edge13_Node000009_Node000004",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node9 -> Node5 [id="edge14_Node000009_Node000005",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ Node1 -> Node3 [id="edge15_Node000001_Node000003",dir="back",color="steelblue1",style="solid",tooltip=" "]; │ │ │ │ } │ │ │ ├── ./usr/share/doc/libmaloc-dev/html/a00029.html │ │ │ │ @@ -1,15 +1,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ -MALOC: vpred.h File Reference │ │ │ │ +MALOC: vio.h File Reference │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
│ │ │ │ @@ -40,103 +40,167 @@ │ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ +Classes | │ │ │ │ Macros | │ │ │ │ +Typedefs | │ │ │ │ +Enumerations | │ │ │ │ Functions
│ │ │ │ -
vpred.h File Reference
│ │ │ │ +
vio.h File Reference
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -

Header file for the Geometric Predicates. │ │ │ │ +

Class Vio: virtual <SDIO/FILE/BUFF/UNIX/INET> I/O layer. │ │ │ │ More...

│ │ │ │
#include <maloc/maloc_base.h>
│ │ │ │ +#include <maloc/vnm.h>
│ │ │ │
│ │ │ │ -Include dependency graph for vpred.h:
│ │ │ │ +Include dependency graph for vio.h:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │ This graph shows which files directly or indirectly include this file:
│ │ │ │
│ │ │ │ -
│ │ │ │ +
│ │ │ │
│ │ │ │
│ │ │ │

Go to the source code of this file.

│ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Classes

struct  sVio
 Contains public data members for Vio class. More...
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ Macros

#define INEXACT   /* Nothing */
 Parameters and constants "INEXACT".
 
#define REAL   double
 float or double
 
#define REALPRINT   doubleprint
 Print the bit representation of a double.
 
#define REALRAND   doublerand
 Generate a double with random 53-bit significand and a random exponent in [0, 511].
 
#define NARROWRAND   narrowdoublerand
 Generate a double with random 53-bit significand and a random exponent in [0, 7].
 
#define UNIFORMRAND   uniformdoublerand
 Generate a double with random 53-bit significand.
 
#define VPORTNUMBER   14916
 our portbase; 5000 < VPORTNUMBER < 49152
 
#define VIO_MAXBUF   10
 number of internal buffers (BUFF datatype)
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +

│ │ │ │ +Typedefs

typedef enum VIOtype VIOtype
 Parameter for I/O type (sdio,buff,file,unix,inet)
 
typedef enum VIOfrmt VIOfrmt
 Parameter for compression type (XDR,ASC)
 
typedef enum VIOrwkey VIOrwkey
 Parameter for rw type (R,RW)
 
typedef struct sVio Vio
 Declaration of the Vio class as the Vio structure.
 
│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ +Enumerations

enum  VIOtype {
│ │ │ │ +  VIO_NO_TYPE │ │ │ │ +, VIO_SDIO │ │ │ │ +, VIO_BUFF │ │ │ │ +, VIO_FILE │ │ │ │ +,
│ │ │ │ +  VIO_UNIX │ │ │ │ +, VIO_INET │ │ │ │ +
│ │ │ │ + }
 Parameter for I/O type (sdio,buff,file,unix,inet) More...
 
enum  VIOfrmt { VIO_NO_FRMT │ │ │ │ +, VIO_XDR │ │ │ │ +, VIO_ASC │ │ │ │ + }
 Parameter for compression type (XDR,ASC) More...
 
enum  VIOrwkey { VIO_NO_RW │ │ │ │ +, VIO_R │ │ │ │ +, VIO_W │ │ │ │ + }
 Parameter for rw type (R,RW) More...
 
│ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │

│ │ │ │ Functions

void Vpred_exactinit (void)
 Initialize the variables used for exact arithmetic.
 
REAL Vpred_orient2d (REAL *pa, REAL *pb, REAL *pc)
 Adaptive exact 2D orientation test. Robust.
 
REAL Vpred_orient2dfast (REAL *pa, REAL *pb, REAL *pc)
 Approximate 2D orientation test. Nonrobust.
 
REAL Vpred_orient2dexact (REAL *pa, REAL *pb, REAL *pc)
 Exact 2D orientation test. Robust.
 
REAL Vpred_orient3d (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Adaptive exact 3D orientation test. Robust.
 
REAL Vpred_orient3dfast (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Approximate 3D orientation test. Nonrobust.
 
REAL Vpred_orient3dexact (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Exact 3D orientation test. Robust.
 
REAL Vpred_incircle (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Adaptive exact 2D incircle test. Robust.
 
REAL Vpred_incirclefast (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Approximate 2D incircle test. Nonrobust.
 
REAL Vpred_incircleexact (REAL *pa, REAL *pb, REAL *pc, REAL *pd)
 Exact 2D incircle test. Robust.
 
REAL Vpred_insphere (REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
 Adaptive exact 3D insphere test. Robust.
 
REAL Vpred_inspherefast (REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
 Approximate 3D insphere test. Nonrobust.
 
REAL Vpred_insphereexact (REAL *pa, REAL *pb, REAL *pc, REAL *pd, REAL *pe)
 Exact 3D insphere test. Robust.
 
void Vio_start (void)
 Start Vio communication layer (init internal variables/buffers)
 
void Vio_stop (void)
 Shutdown Vio communication layer.
 
VioVio_ctor (const char *socktype, const char *datafrmt, const char *hostname, const char *filename, const char *rwkey)
 Construct the Vio object.
 
int Vio_ctor2 (Vio *thee, const char *socktype, const char *datafrmt, const char *hostname, const char *filename, const char *rwkey)
 Work routine that Vio_ctor calls to do most of the construction.
 
void Vio_dtor (Vio **thee)
 Destruct the Vio object.
 
void Vio_dtor2 (Vio *thee)
 Work routine that Vio_dtor calls to do most of the destruction.
 
void Vio_setWhiteChars (Vio *thee, char *whiteChars)
 Set the white character set for I/O stream.
 
void Vio_setCommChars (Vio *thee, char *commChars)
 Set the comment character set for I/O stream.
 
int Vio_accept (Vio *thee, int nonblock)
 Accept any waiting connect attempt to our socket on our machine.
 
void Vio_acceptFree (Vio *thee)
 Free the socket child that was used for the last accept.
 
int Vio_connect (Vio *thee, int nonblock)
 Connect to some socket on a remote machine (or on our machine)
 
void Vio_connectFree (Vio *thee)
 Purge any output buffers (for <UNIX/INET>, else a no-op)
 
int Vio_scanf (Vio *thee, char *parms,...)
 Mimic "scanf" from an arbitrary Vio device.
 
int Vio_printf (Vio *thee, char *parms,...)
 Mimic "printf" from an arbitrary Vio device.
 
int Vio_read (Vio *thee, char *buf, int bufsize)
 Read (up to) bufsize characters into buf from input device.
 
int Vio_write (Vio *thee, char *buf, int bufsize)
 Write bufsize characters from buf to output device.
 
void Vio_bufTake (Vio *thee, char *buf, int bufsize)
 Set the pointer to the internal buffer.
 
char * Vio_bufGive (Vio *thee)
 Return the pointer to the internal buffer.
 
int Vio_bufSize (Vio *thee)
 Return the length to the internal buffer.
 
VioVio_socketOpen (char *key, const char *iodev, const char *iofmt, const char *iohost, const char *iofile)
 Socket open for read or write.
 
void Vio_socketClose (Vio **sock)
 Socket close from read or write.
 
│ │ │ │

Detailed Description

│ │ │ │ -

Header file for the Geometric Predicates.

│ │ │ │ +

Class Vio: virtual <SDIO/FILE/BUFF/UNIX/INET> I/O layer.

│ │ │ │
Version
│ │ │ │ -
Id
vpred.h,v 1.4 2010/08/12 05:40:37 fetk Exp
│ │ │ │ +
Id
vio.h,v 1.28 2010/08/12 05:40:35 fetk Exp
│ │ │ │
Author
Michael Holst
│ │ │ │
Attention
*
│ │ │ │  * MALOC = < Minimal Abstraction Layer for Object-oriented C >
│ │ │ │  * Copyright (C) 1994-- Michael Holst
│ │ │ │  *
│ │ │ │  * This library is free software; you can redistribute it and/or
│ │ │ │  * modify it under the terms of the GNU Lesser General Public
│ │ │ │ @@ -148,755 +212,45 @@
│ │ │ │  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
│ │ │ │  * Lesser General Public License for more details.
│ │ │ │  *
│ │ │ │  * You should have received a copy of the GNU Lesser General Public
│ │ │ │  * License along with this library; if not, write to the Free Software
│ │ │ │  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
│ │ │ │  * 
│ │ │ │ -*  
│ │ │ │ +* │ │ │ │

Macro Definition Documentation

│ │ │ │ - │ │ │ │ -

◆ INEXACT

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define INEXACT   /* Nothing */
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Parameters and constants "INEXACT".

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ NARROWRAND

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define NARROWRAND   narrowdoublerand
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Generate a double with random 53-bit significand and a random exponent in [0, 7].

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ REAL

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define REAL   double
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

float or double

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ REALPRINT

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define REALPRINT   doubleprint
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Print the bit representation of a double.

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ REALRAND

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define REALRAND   doublerand
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Generate a double with random 53-bit significand and a random exponent in [0, 511].

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ UNIFORMRAND

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
#define UNIFORMRAND   uniformdoublerand
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Generate a double with random 53-bit significand.

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ -

Function Documentation

│ │ │ │ - │ │ │ │ -

◆ Vpred_exactinit()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
void Vpred_exactinit (void )
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Initialize the variables used for exact arithmetic.

│ │ │ │ -
Note
‘epsilon’ is the largest power of two such that 1.0 + epsilon = 1.0 in floating-point arithmetic. ‘epsilon’ bounds the relative roundoff error. It is used for floating-point error analysis. ‘splitter’ is used to split floating-point numbers into two half- length significands for exact multiplication. I imagine that a highly optimizing compiler might be too smart for its own good, and somehow cause this routine to fail, if it pretends that floating-point arithmetic is too much like real arithmetic. Don't change this routine unless you fully understand it.
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_incircle()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_incircle (REALpa,
REALpb,
REALpc,
REALpd 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Adaptive exact 2D incircle test. Robust.

│ │ │ │ -
Returns
a positive value if the point pd lies inside the circle passing through pa, pb, and pc; a negative value if it lies outside; and zero if the four points are cocircular. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_incircleexact()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_incircleexact (REALpa,
REALpb,
REALpc,
REALpd 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Exact 2D incircle test. Robust.

│ │ │ │ -
Returns
a positive value if the point pd lies inside the circle passing through pa, pb, and pc; a negative value if it lies outside; and zero if the four points are cocircular. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_incirclefast()

│ │ │ │ + │ │ │ │ +

◆ VIO_MAXBUF

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
REAL Vpred_incirclefast (REALpa,
REALpb,
REALpc,
REALpd 
)#define VIO_MAXBUF   10
│ │ │ │
│ │ │ │ │ │ │ │ -

Approximate 2D incircle test. Nonrobust.

│ │ │ │ -
Returns
a positive value if the point pd lies inside the circle passing through pa, pb, and pc; a negative value if it lies outside; and zero if the four points are cocircular. The points pa, pb, and pc must be in counterclockwise order, or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

number of internal buffers (BUFF datatype)

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ - │ │ │ │ -

◆ Vpred_insphere()

│ │ │ │ + │ │ │ │ +

◆ VPORTNUMBER

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_insphere (REALpa,
REALpb,
REALpc,
REALpd,
REALpe 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Adaptive exact 3D insphere test. Robust.

│ │ │ │ -
Returns
a positive value if the point pe lies inside the sphere passing through pa, pb, pc, and pd; a negative value if it lies outside; and zero if the five points are cospherical. The points pa, pb, pc, and pd must be ordered so that they have a positive orientation (as defined by orient3d()), or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
pePointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_insphereexact()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_insphereexact (REALpa,
REALpb,
REALpc,
REALpd,
REALpe 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Exact 3D insphere test. Robust.

│ │ │ │ -
Returns
a positive value if the point pe lies inside the sphere passing through pa, pb, pc, and pd; a negative value if it lies outside; and zero if the five points are cospherical. The points pa, pb, pc, and pd must be ordered so that they have a positive orientation (as defined by orient3d()), or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
pePointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_inspherefast()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_inspherefast (REALpa,
REALpb,
REALpc,
REALpd,
REALpe 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Approximate 3D insphere test. Nonrobust.

│ │ │ │ -
Returns
a positive value if the point pe lies inside the sphere passing through pa, pb, pc, and pd; a negative value if it lies outside; and zero if the five points are cospherical. The points pa, pb, pc, and pd must be ordered so that they have a positive orientation (as defined by orient3d()), or the sign of the result will be reversed.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
pePointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient2d()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_orient2d (REALpa,
REALpb,
REALpc 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Adaptive exact 2D orientation test. Robust.

│ │ │ │ -
Returns
a positive value if the points pa, pb, and pc occur in counterclockwise order; a negative value if they occur in clockwise order; and zero if they are collinear. The result is also a rough approximation of twice the signed area of the triangle defined by the three points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient2dexact()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_orient2dexact (REALpa,
REALpb,
REALpc 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Exact 2D orientation test. Robust.

│ │ │ │ -
Returns
a positive value if the points pa, pb, and pc occur in counterclockwise order; a negative value if they occur in clockwise order; and zero if they are collinear. The result is also a rough approximation of twice the signed area of the triangle defined by the three points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient2dfast()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_orient2dfast (REALpa,
REALpb,
REALpc 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Approximate 2D orientation test. Nonrobust.

│ │ │ │ -
Returns
a positive value if the points pa, pb, and pc occur in counterclockwise order; a negative value if they occur in clockwise order; and zero if they are collinear. The result is also a rough approximation of twice the signed area of the triangle defined by the three points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient3d()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_orient3d (REALpa,
REALpb,
REALpc,
REALpd 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Adaptive exact 3D orientation test. Robust.

│ │ │ │ -
Returns
a positive value if the point pd lies below the plane passing through pa, pb, and pc; "below" is defined so that pa, pb, and pc appear in counterclockwise order when viewed from above the plane. Returns a negative value if pd lies above the plane. Returns zero if the points are coplanar. The result is also a rough approximation of six times the signed volume of the tetrahedron defined by the four points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient3dexact()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
REAL Vpred_orient3dexact (REALpa,
REALpb,
REALpc,
REALpd 
)
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

Exact 3D orientation test. Robust.

│ │ │ │ -
Returns
a positive value if the point pd lies below the plane passing through pa, pb, and pc; "below" is defined so that pa, pb, and pc appear in counterclockwise order when viewed from above the plane. Returns a negative value if pd lies above the plane. Returns zero if the points are coplanar. The result is also a rough approximation of six times the signed volume of the tetrahedron defined by the four points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ -

◆ Vpred_orient3dfast()

│ │ │ │ - │ │ │ │ -
│ │ │ │ -
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │
REAL Vpred_orient3dfast (REALpa,
REALpb,
REALpc,
REALpd 
)#define VPORTNUMBER   14916
│ │ │ │
│ │ │ │ │ │ │ │ -

Approximate 3D orientation test. Nonrobust.

│ │ │ │ -
Returns
a positive value if the point pd lies below the plane passing through pa, pb, and pc; "below" is defined so that pa, pb, and pc appear in counterclockwise order when viewed from above the plane. Returns a negative value if pd lies above the plane. Returns zero if the points are coplanar. The result is also a rough approximation of six times the signed volume of the tetrahedron defined by the four points.
│ │ │ │ -
Parameters
│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
paPointer to a real parameter
pbPointer to a real parameter
pcPointer to a real parameter
pdPointer to a real parameter
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +

our portbase; 5000 < VPORTNUMBER < 49152

│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │