Skip to content

Commit f4da165

Browse files
authored
[Enhancement] Expand README Description (#10)
* Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
1 parent 102dbff commit f4da165

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@
3636
A Fortran 2018 library for conditional (de-)allocation of allocatable objects of
3737
intrinsic types.
3838

39+
1. [License](#license)
40+
2. [Software Requirements](#software-requirements)
41+
3. [Description](#description)
42+
4. [Build](#build)
43+
3944
## License
4045

4146
This project's license is **GPL-2.0** (as of June 1991). The whole license text
@@ -98,4 +103,65 @@ repository contains. It furthermore controls which files are going to be
98103
removed by `git clean`. Thus, it is the simplest solution to employ **Git** for
99104
the removal of build artifacts.
100105

106+
## Description
107+
108+
This repository provides the source code for a library named `libf18cndmem.a`.
109+
The purpose of this library is the conditional allocation and deallocation of
110+
allocatable objects of Fortran intrinsic types. It is written in Free Form
111+
Fortran 2018.
112+
113+
As the deallocation of an allocatable object which is not already allocated will
114+
result in a runtime error, it needs to be checked whether the object to
115+
deallocate is allocated at all. The deallocation subroutines this library
116+
provides will take care about both this check and the deallocation, if required.
117+
All those subroutines are exposed with the generic interface `cnddel` which is
118+
an abbreviation of "***C***o***nd***itional ***De***a***l***location". At the
119+
moment, the following types are supported:
120+
121+
* `character` (default)
122+
123+
Fortran 2018 has automatic reallocation features which allow for a convenient
124+
and comprehensive coding style. Under certain circumstances, it might not be
125+
obvious if an allocatable object is already allocated such that the automatic
126+
reallocation on intrinsic assignment could be processed. Then, it need to be
127+
tested whether there is already a memory region allocated for the respective
128+
object. If not so, an according amount of memory needs to be allocated before
129+
the assignment can be performed. This library provides a counterpart to the
130+
conditional deallocation, named `cndall`, to check whether some memory was
131+
already allocated and to assign the intended object to the target object. The
132+
name `cndall` is an abbreviation of "***C***o***nd***itional ***All***ocation".
133+
At the moment, the following types are supported:
134+
135+
* `character` (default)
136+
137+
## Build
138+
139+
The build routine is organised by Just and defined in the `.justfile` in the
140+
repository root. To build the library, one of the following instructions can
141+
be executed.
142+
143+
```bash
144+
just b
145+
just build
146+
just l
147+
just library
148+
```
149+
150+
In addition, an automatic source code documentation with Doxygen is configured.
151+
One of the following commands will invoke the compilation.
152+
153+
```bash
154+
just d
155+
just doxygen
156+
```
157+
158+
If the compilation of both the library and its documentation is wished, the
159+
following instructions can be executed.
160+
161+
```bash
162+
just
163+
just a
164+
just all
165+
```
166+
101167
<!----------------------------------------------------------------------------->

0 commit comments

Comments
 (0)