source: pcp/src/helpers.h@ a0bcf1

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

-initial commit
-Minimum set of files needed from ESPACK SVN repository
-Switch to three tantamount package parts instead of all relating to pcp (as at some time Ralf's might find inclusion as well)

  • Property mode set to 100644
File size: 1.8 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#include<stddef.h> /* fuer size_t */
18
19void debug(struct Problem *P, const char *output);
20/* Eigene malloc, die bei einem Fehler an Error output uebergibt */
21void* Malloc(size_t size, const char* output);
22
23char* MallocString(size_t size, const char* output);
24
25/* Eigene malloc, die bei einem Fehler erzeugten (ein int rein) output an Error uebergibt */
26void* Malloci(size_t size, const char* output, int i);
27
28/* Eigene malloc, die bei einem Fehler erzeugten (zwei int rein) output an Error uebergibt */
29void* Mallocii(size_t size, const char* output, int i, int j);
30
31/* Dasselbe wie oben mit realloc */
32void* Realloc(void* pointer, size_t size, const char* output);
33void* Realloci(void* pointer, size_t size, const char* output, int i);
34void* Reallocii(void* pointer, size_t size, const char* output, int i, int j);
35void Free (void *ptr);
36
37void GetRGB(int i, unsigned int max, double* rgb);
38
39/** Get current time.
40 * Uses MPI_Wtime() to get current system time, synchronously for all processes.
41 * \return current time
42 */
43static inline /*@unused@*/ double GetTime(void)
44{
45 double t;
46 t = MPI_Wtime();
47 return t;
48};
49
50void InitSpeedMeasure(struct Problem *P);
51void SpeedMeasure(struct Problem *P, enum TimeTypes TT, enum TimeDoTypes TOT);
52void CompleteSpeedMeasure(struct Problem *P);
53void StartParallel (struct Problem *P, char **argv);
54void WaitForOtherProcs(struct Problem *P, int out);
55/*void SetArrayToDouble0(double *a, int n);*/
56void RemoveEverything(struct Problem *P);
57#endif
Note: See TracBrowser for help on using the repository browser.