Last change
on this file since 12706 was 12706, checked in by Mathieu Morlighem, 13 years ago |
merged trunk-jpl and trunk for revision 12703
|
File size:
680 bytes
|
Rev | Line | |
---|
[12696] | 1 | /*!\file: ProfilingStart.cpp
|
---|
| 2 | * \brief ProfilingStart.c: initialize profiling before calling a routine
|
---|
| 3 | */
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | /*Include files: {{{*/
|
---|
| 7 | #ifdef HAVE_CONFIG_H
|
---|
| 8 | #include <config.h>
|
---|
| 9 | #else
|
---|
| 10 | #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
|
---|
| 11 | #endif
|
---|
| 12 | #include "../../include/macros.h"
|
---|
| 13 | #include "../shared.h"
|
---|
| 14 | /*}}}*/
|
---|
| 15 |
|
---|
| 16 | void ProfilingStart(double* pTime_start, double* pFlops_start){
|
---|
| 17 |
|
---|
| 18 | double Time_start, Flops_start;
|
---|
| 19 |
|
---|
| 20 | #ifdef _HAVE_PETSC_
|
---|
| 21 | PetscGetTime(&Time_start);
|
---|
| 22 | PetscGetFlops(&Flops_start );
|
---|
| 23 | #else
|
---|
| 24 | _error_("Profiling not supported under this numerical toolkit");
|
---|
| 25 | #endif
|
---|
| 26 |
|
---|
| 27 | /*Assign pointers: */
|
---|
| 28 | *pTime_start=Time_start;
|
---|
| 29 | *pFlops_start=Flops_start;
|
---|
| 30 | return;
|
---|
| 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.