source: pcp/src/helpers.h@ f70c2a

Last change on this file since f70c2a was e08f45, checked in by Frederik Heber <heber@…>, 17 years ago

Merge branch 'ConcaveHull' of ../espack2 into ConcaveHull

Conflicts:

molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/linkedcell.cpp
molecuilder/src/linkedcell.hpp
molecuilder/src/vector.cpp
molecuilder/src/vector.hpp
util/src/NanoCreator.c

Basically, this resulted from a lot of conversions two from spaces to one tab, which is my standard indentation. The mess was caused by eclipse auto-indenting. And in espack2:ConcaveHull was the new stuff, so all from ConcaveHull was replaced in case of doubt.
Additionally, vector had ofstream << operator instead ostream << ...

  • Property mode set to 100755
File size: 2.5 KB
Line 
1#ifndef helpers_h
2#define helpers_h
3/** \file helpers.h
4 * Header file for \ref helpers.c
5 *
6 * Contains declarations of the functions implemented in \ref helpers.c and one
7 * inline function which gets current time via an MPI call: GetTime().
8 *
9 Project: ParallelCarParrinello
10 Jan Hamaekers
11 2000
12
13 File: helpers.h
14 $Id: helpers.h,v 1.9 2007/02/09 09:13:48 foo Exp $
15*/
16
17#ifdef HAVE_CONFIG_H
18#include <config.h>
19#endif
20
21#include<stddef.h> /* fuer size_t */
22
23// taken out of TREMOLO
24/*@-namechecks@*/
25#ifndef __GNUC__
26# undef __attribute__
27# define __attribute__(x)
28#endif
29/*@=namechecks@*/
30
31
32/* Behandelt aufgetretene Fehler. error ist der Fehlertyp(enum Errors)
33 void *SpecialData ist ein untypisierter Zeiger auf Spezielle Daten zur Fehlerbehandlung.
34 Man koennte auch noch einen Zeiger auf eine Funktion uebergeben */
35extern void /*@exits@*/ debug(struct Problem *P, const char *output);
36 //__attribute__ ((__return__));
37#define debug(problemstruct, data) debug_in((problemstruct), (data), __FILE__, __LINE__)
38
39extern void /*@exits@*/ debug_in(struct Problem *P, const char *output,
40 const char *file, const int line);
41 //__attribute__ ((__return__));
42
43/* Eigene malloc, die bei einem Fehler an Error output uebergibt */
44void* Malloc(size_t size, const char* output);
45
46char* MallocString(size_t size, const char* output);
47
48/* Eigene malloc, die bei einem Fehler erzeugten (ein int rein) output an Error uebergibt */
49void* Malloci(size_t size, const char* output, int i);
50
51/* Eigene malloc, die bei einem Fehler erzeugten (zwei int rein) output an Error uebergibt */
52void* Mallocii(size_t size, const char* output, int i, int j);
53
54/* Dasselbe wie oben mit realloc */
55void* Realloc(void* pointer, size_t size, const char* output);
56void* Realloci(void* pointer, size_t size, const char* output, int i);
57void* Reallocii(void* pointer, size_t size, const char* output, int i, int j);
58void Free (void *ptr, const char* output);
59
60void GetRGB(int i, unsigned int max, double* rgb);
61
62/** Get current time.
63 * Uses MPI_Wtime() to get current system time, synchronously for all processes.
64 * \return current time
65 */
66static inline /*@unused@*/ double GetTime(void)
67{
68 double t;
69 t = MPI_Wtime();
70 return t;
71};
72
73void InitSpeedMeasure(struct Problem *P);
74void SpeedMeasure(struct Problem *P, enum TimeTypes TT, enum TimeDoTypes TOT);
75void CompleteSpeedMeasure(struct Problem *P);
76void StartParallel (struct Problem *P, char **argv);
77void WaitForOtherProcs(struct Problem *P, int out);
78/*void SetArrayToDouble0(double *a, int n);*/
79void RemoveEverything(struct Problem *P);
80#endif
Note: See TracBrowser for help on using the repository browser.