/[escript]/trunk/escript/src/blocktimer.h
ViewVC logotype

Contents of /trunk/escript/src/blocktimer.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1634 - (show annotations)
Sat Jul 12 09:08:33 2008 UTC (12 years, 11 months ago) by phornby
File MIME type: text/plain
File size: 716 byte(s)
linux_gcc_eg_options.py:
remove the std99 option, it is no longer needed as the code compiles without
C 1999 extension (need for these extensions elinminated in windows port).
Turn on all warnings except unknown pragmas. Should catch a lot of stuff.

SConstruct:
Impassioned plea

system_dep.h:
Add the standard incantation for dealing with const declarations
in C code called from C and C++

blocktimer:
Get the calling interface right for C code called from C and C++
and use __const as defined in system_dep.h
(Should be re-factored into compiler_dep.h file).

MeshAdapterFactory.cpp:
Since we have (effectively) no control over netCDF policy,
cast const char *'s to char *'s


1 #include <stdio.h>
2 #include <search.h>
3 #include "system_dep.h"
4
5 /* If you are going to call stuff in C from C and C++, */
6 /* please take care. */
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 /* Enable the block timer (or remove this and use -DBLOCKTIMER) */
13 /* # define BLOCKTIMER */
14
15 # define NUM_TIMERS 1024
16
17 ESCRIPT_DLL_API
18 void blocktimer_initialize();
19 ESCRIPT_DLL_API
20 void blocktimer_increment(__const char *name, double start_time);
21 ESCRIPT_DLL_API
22 int blocktimer_getOrCreateTimerId(__const char *name);
23 ESCRIPT_DLL_API
24 void blocktimer_reportSortByName();
25 ESCRIPT_DLL_API
26 void blocktimer_reportSortByTime();
27 ESCRIPT_DLL_API
28 double blocktimer_time();
29
30
31 #ifdef __cplusplus
32 }
33 #endif

  ViewVC Help
Powered by ViewVC 1.1.26