File: PSM.dox

package info (click to toggle)
geogram 1.9.6-1
  • links: PTS, VCS
  • area: contrib
  • in suites: sid
  • size: 15,436 kB
  • sloc: cpp: 143,890; ansic: 10,098; perl: 1,430; sh: 1,199; yacc: 522; lex: 182; python: 157; javascript: 149; makefile: 17
file content (136 lines) | stat: -rw-r--r-- 3,563 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
namespace GEO {

/**

\page geogram_PSM Geogram Pluggable Software Modules

Pluggable Software Modules
==========================

Some users of Geogram may be interested only in a subset of
Geogram functionalities.
Following the principle that Geogram should be as easy to use/compile as
possible, some subsets of functionalities are alternatively available as
a standalone pair of (header,implementation) files, automatically
extracted/assembled from Geogram sourcetree. This makes the functionality
usable with 0 dependency: client code that uses a PSM just
need to insert the header and the implementation file into the project
(rather than linking with the entire Geogram library).

Geogram PSMs are available in the
[Geogram distribution](https://gforge.inria.fr/frs/?group_id=5833)

They can be also automatically generated from the Geogram sourcetree, by using:
\code
   tools/extract_psm.sh filename.psm
\endcode
on a Linux box or under Cygwin (the latter is untested).

Most PSMs come with an example file. To compile, use:
\code
  g++ MultiPrecision_example.cpp MultiPrecision_psm.cpp -o MultiPrecision_example
\endcode
(where MultiPrecision can be replaced with the PSM name)

List of PSMs
============

OpenNL 
------

(src/lib/geogram/NL/OpenNL.psm): solvers for sparse
linear systems / least squares regression

To compile, it needs the math library:
\code
  gcc OpenNL_example.c OpenNL_psm.c -o OpenNL_example -lm 
\endcode

To enable support for SuperLU dynamic linking (Linux only), use:
\code
  gcc -DGEO_DYNAMIC_LIBS OpenNL_example.c OpenNL_psm.c -o OpenNL_example -lm -ldl
\endcode

To enable OpenMP parallel mode, use:
\code
  gcc -fopenmp OpenNL_example.c OpenNL_psm.c -o OpenNL_example -lm 
\endcode

MultiPrecision 
--------------

(src/lib/geogram/numerics/MultiPrecision.psm):
an easy-to-use number type for computing the exact sign of a polynom

To compile, use:
\code
  g++ MultiPrecision_example.cpp MultiPrecision_psm.cpp -o MultiPrecision_example
\endcode

Predicates 
----------

(src/lib/geogram/numerics/Predicates.psm):
exact geometric predicates with symbolic perturbation (SOS)

To compile, use:
\code
   g++ -c Predicates_psm.cpp 
\endcode
(no example program for now)


Delaunay
--------

(src/lib/geogram/delaunay/Delaunay.psm): Sequential and parallel Delaunay 
triangulation and power diagrams in 2D and 3D. 

To compile, use:
\code
  gcc -O3 -fopenmp -frounding-math -ffp-contract=off Delaunay_example.cpp Delaunay_psm.cpp -o Delaunay_example -lm 
\endcode



Syntax of a PSM file
====================

A PSM file specifies a list of header files and a list of
source files that will be assembled into a single header file
(respectively a single source file). All file paths are relative
to where the PSM file is located:

\code
HEADERS="header_1.h header_2.h ... header_n.h"
\endcode

Sources can be either C++ or C files. If sources are only C files,
then the generated source is a C file, else it is a C++ file:

\code
SOURCES="source_1.cpp source_2.cpp ... source_n.cpp"
\endcode

To avoid including too many Geogram classes in a PSM, there is a drop-in
replacement of some Geogram mechanisms (Logger, etc...) in basic/psm.h.

There is also a link to a documentation page, that is inserted
in the generated header:

\code
DOC="https://brunolevy.github.io/geogram/predicates_8h.html"
\endcode

Optionally, there can be an example file, that will be also extracted.
It can be a C++ or a C program. The specified path is relative to where
the PSM file is located:

\code
EXAMPLE="path to example.cpp"
\endcode


*/

}